📄 frmtime.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frmtime
BorderStyle = 3 'Fixed Dialog
Caption = "时间设定"
ClientHeight = 5895
ClientLeft = 45
ClientTop = 435
ClientWidth = 5895
Icon = "Frmtime.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5895
ScaleWidth = 5895
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Timer Timer1
Interval = 1000
Left = 90
Top = 4050
End
Begin VB.CommandButton Command5
Caption = "结束"
Height = 465
Left = 3105
TabIndex = 12
Top = 5310
Width = 1680
End
Begin VB.CommandButton Command4
Caption = "采取新设定"
Height = 420
Left = 4500
TabIndex = 9
Top = 4770
Width = 1110
End
Begin VB.CommandButton Command3
Caption = "保存"
Height = 420
Left = 3420
TabIndex = 8
Top = 4770
Width = 975
End
Begin VB.CommandButton Command2
Caption = "删除"
Height = 420
Left = 2385
TabIndex = 7
Top = 4770
Width = 975
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 420
Left = 1350
TabIndex = 6
Top = 4770
Width = 975
End
Begin VB.TextBox Text2
DataField = "关机时间"
BeginProperty DataFormat
Type = 1
Format = "H:mm"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 4
EndProperty
DataSource = "Adodc1"
Height = 420
Left = 3780
TabIndex = 5
Text = "Text2"
Top = 4005
Width = 1140
End
Begin VB.TextBox Text1
DataField = "开机时间"
BeginProperty DataFormat
Type = 1
Format = "H:mm"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 4
EndProperty
DataSource = "Adodc1"
Height = 420
Left = 1530
TabIndex = 3
Text = "Text1"
Top = 4005
Width = 1140
End
Begin MSAdodcLib.Adodc Adodc1
Height = 420
Left = 135
Top = 4800
Width = 1200
_ExtentX = 2117
_ExtentY = 741
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=D:\双串口控制\DATA\dbcom1.mdb"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=D:\双串口控制\DATA\dbcom1.mdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "biao1"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Frmtime.frx":0442
Height = 3390
Left = 135
TabIndex = 2
Top = 135
Width = 5640
_ExtentX = 9948
_ExtentY = 5980
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "设定值为:"
Height = 180
Left = 45
TabIndex = 13
Top = 5400
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Label5"
Height = 180
Left = 2025
TabIndex = 11
Top = 5400
Width = 540
End
Begin VB.Line Line1
X1 = 1665
X2 = 1980
Y1 = 5490
Y2 = 5490
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Label4"
Height = 180
Left = 1080
TabIndex = 10
Top = 5400
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "关机时间"
Height = 180
Left = 3015
TabIndex = 4
Top = 4095
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "时间的输入格式如下:17:25"
Height = 180
Left = 1710
TabIndex = 1
Top = 3735
Width = 2250
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "开机时间"
Height = 180
Left = 765
TabIndex = 0
Top = 4095
Width = 720
End
End
Attribute VB_Name = "Frmtime"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
Adodc1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
On Error Resume Next
If MsgBox("是否删除", vbYesNo + vbInformation, "提示") = vbYes Then
Adodc1.Recordset.Delete
End If
End Sub
Private Sub Command3_Click()
On Error Resume Next
Adodc1.Recordset.Update
End Sub
Private Sub Command4_Click()
Label4.Caption = Text1.Text
Label5.Caption = Text2.Text
X = 0
On Error Resume Next
If Err Then
MsgBox Error$, 48
Exit Sub
End If
SaveSetting App.Title, "属性", "开机时间1", Frmtime.Label4.Caption
SaveSetting App.Title, "属性", "关机时间1", Frmtime.Label5.Caption
time10 = Text1.Text
time11 = Text2.Text
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next
time10 = GetSetting(App.Title, "属性", "开机时间1", "")
time11 = GetSetting(App.Title, "属性", "关机时间1", "")
Label4.Caption = time10
Label5.Caption = time11
If Err Then
MsgBox Error$, 48
Exit Sub
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Frmcom.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -