dbt111.frm
来自「实现图像控制,云台解码器控制,站点选择(配有Access数据库).」· FRM 代码 · 共 238 行
FRM
238 行
VERSION 5.00
Begin VB.Form dbt111
Caption = "数据库录入"
ClientHeight = 4290
ClientLeft = 60
ClientTop = 345
ClientWidth = 5685
BeginProperty Font
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4290
ScaleWidth = 5685
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command7
Caption = "局巡显时间设为2秒"
Height = 375
Left = 360
TabIndex = 6
Top = 3120
Width = 2295
End
Begin VB.CommandButton Command6
Caption = "flagkey01标志设为true"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 5
Top = 2400
Width = 2415
End
Begin VB.CommandButton Command2
Caption = "云台(PTC)配置初始化"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 4
Top = 2400
Width = 2295
End
Begin VB.CommandButton Command1
Caption = "相机名称初始化"
Height = 375
Left = 360
TabIndex = 3
Top = 600
Width = 2295
End
Begin VB.CommandButton Command5
Caption = "相机状态清零"
Height = 375
Left = 2880
TabIndex = 2
Top = 600
Width = 2400
End
Begin VB.CommandButton Command4
Caption = "mcu状态初始化(清零)"
Height = 375
Left = 2880
TabIndex = 1
Top = 1560
Width = 2415
End
Begin VB.CommandButton Command3
Caption = "端局名称初始化"
Height = 375
Left = 360
TabIndex = 0
Top = 1560
Width = 2295
End
End
Attribute VB_Name = "dbt111"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db1 As Database
Dim db1rs1 As Recordset
Dim db1rs2 As Recordset
Dim db1rs3 As Recordset
Dim db1rs4 As Recordset
Dim db1rs5 As Recordset
Dim db1rs6 As Recordset
Dim db1rs7 As Recordset
Dim i As Integer
Dim aa1 As Integer
Dim aa2 As Integer
Dim a1 As Integer
Dim a2 As Integer
Dim a3 As Integer
Dim mmm As Integer
Dim nnn As Integer
Private Sub Form_Load()
Set db1 = OpenDatabase(App.Path + "\rtc.mdb")
' Set db1 = OpenDatabase("c:\hf2000s\rtc.mdb")
If Err Then MsgBox " 数据库不存在 ! "
Set db1rs1 = db1.OpenRecordset("cmrname")
Set db1rs2 = db1.OpenRecordset("cmrsta")
Set db1rs3 = db1.OpenRecordset("stationname")
Set db1rs4 = db1.OpenRecordset("mcusta")
Set db1rs5 = db1.OpenRecordset("yuntai")
Set db1rs6 = db1.OpenRecordset("flagkey01")
Set db1rs7 = db1.OpenRecordset("tmrs")
End Sub
Private Sub Command1_Click() ' 相机名称初始化
With db1rs1
.MoveFirst
For i = 0 To 15
For j = 0 To 4
.Edit
For k = 0 To 15
.Fields(k) = Format(i + 1, "##") & " " & Format(j, "##") & " " & Format(k + 1, "##")
Next k
.Update
.MoveNext
Next j
Next i
End With
End Sub
Private Sub Command2_Click() '云台配置初始化
With db1rs5
.MoveFirst
For i = 0 To 15
For j = 0 To 4
.Edit
For k = 0 To 15
.Fields(k) = 0
Next k
.Update
.MoveNext
Next j
Next i
End With
End Sub
Private Sub Command3_Click() ' 端局名称初始化
' With db1rs3
' .MoveFirst
' For i = 0 To 5
' .Edit
' For k = 0 To 15
' .Fields(k) = Format(i + 1, "##") & " " & Format(k + 1, "##")
' Next k
' .Update
' .MoveNext
' Next i
' End With
With db1rs3
.MoveFirst
.Edit
For k = 0 To 15
.Fields(k) = Format(k + 1, "##") & " " & "分局"
Next k
.Update
End With
End Sub
Private Sub Command4_Click() ' mcu状态初始化(清零)
With db1rs4
.MoveFirst
For i = 0 To 7
.Edit
For k = 0 To 15
.Fields(k) = 0
Next k
.Update
.MoveNext
Next i
End With
End Sub
Private Sub Command5_Click() ' 相机状态初始化(清零)
With db1rs2
.MoveFirst
For i = 0 To 80
.Edit
For j = 0 To 16
.Fields(j) = 0
Next j
.Update
.MoveNext
Next i
End With
End Sub
Private Sub Command6_Click()
With db1rs6
.MoveFirst
.Edit
For i = 0 To 7
.Fields(i) = True
Next i
.Update
End With
End Sub
Private Sub Command7_Click()
With db1rs7
.MoveFirst
.Edit
For i = 0 To 7
.Fields(i) = 1
Next i
.Update
End With
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?