📄 frmtime1.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 Frmtime1
BorderStyle = 3 'Fixed Dialog
Caption = "时间设定"
ClientHeight = 5895
ClientLeft = 45
ClientTop = 330
ClientWidth = 5895
Icon = "Frmtime1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5895
ScaleWidth = 5895
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
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 = 1485
TabIndex = 6
Text = "Text1"
Top = 3870
Width = 1140
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 = 3735
TabIndex = 5
Text = "Text2"
Top = 3870
Width = 1140
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 420
Left = 1305
TabIndex = 4
Top = 4635
Width = 975
End
Begin VB.CommandButton Command2
Caption = "删除"
Height = 420
Left = 2340
TabIndex = 3
Top = 4635
Width = 975
End
Begin VB.CommandButton Command3
Caption = "保存"
Height = 420
Left = 3375
TabIndex = 2
Top = 4635
Width = 975
End
Begin VB.CommandButton Command4
Caption = "采取新设定"
Height = 420
Left = 4455
TabIndex = 1
Top = 4635
Width = 1110
End
Begin VB.CommandButton Command5
Caption = "结束"
Height = 465
Left = 3060
TabIndex = 0
Top = 5175
Width = 1680
End
Begin VB.Timer Timer1
Interval = 1000
Left = 45
Top = 3915
End
Begin MSAdodcLib.Adodc Adodc1
Height = 420
Left = 90
Top = 4635
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 = "biao2"
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 = "Frmtime1.frx":0442
Height = 3390
Left = 180
TabIndex = 7
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 Label1
AutoSize = -1 'True
Caption = "开机时间"
Height = 180
Left = 720
TabIndex = 13
Top = 3960
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "时间的输入格式如下:17:25"
Height = 180
Left = 1665
TabIndex = 12
Top = 3645
Width = 2250
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "关机时间"
Height = 180
Left = 2970
TabIndex = 11
Top = 3960
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Label4"
Height = 180
Left = 1035
TabIndex = 10
Top = 5265
Width = 540
End
Begin VB.Line Line1
X1 = 1620
X2 = 1935
Y1 = 5355
Y2 = 5355
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Label5"
Height = 180
Left = 1980
TabIndex = 9
Top = 5265
Width = 540
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "设定值为:"
Height = 180
Left = 0
TabIndex = 8
Top = 5265
Width = 900
End
End
Attribute VB_Name = "Frmtime1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Unload(Cancel As Integer)
Frmcom.Show
End Sub
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, "属性", "开机时间2", Frmtime1.Label4.Caption
SaveSetting App.Title, "属性", "关机时间2", Frmtime1.Label5.Caption
time20 = Text1.Text
time21 = Text2.Text
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next
time20 = GetSetting(App.Title, "属性", "开机时间2", "")
time21 = GetSetting(App.Title, "属性", "关机时间2", "")
Label4.Caption = time20
Label5.Caption = time21
If Err Then
MsgBox Error$, 48
Exit Sub
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -