📄 frmclients.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frmClientS
BorderStyle = 3 'Fixed Dialog
Caption = "确定机器名称及其电话号码"
ClientHeight = 5070
ClientLeft = 45
ClientTop = 330
ClientWidth = 8040
DrawWidth = 2
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmClientS.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5070
ScaleWidth = 8040
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.ListBox List1
Height = 480
ItemData = "frmClientS.frx":030A
Left = 120
List = "frmClientS.frx":0314
TabIndex = 4
Top = 3840
Visible = 0 'False
Width = 1368
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "frmClientS.frx":0325
Height = 3600
Left = 252
OleObjectBlob = "frmClientS.frx":0339
TabIndex = 2
Top = 600
Width = 7188
End
Begin VB.Data Data1
BackColor = &H00C0E0FF&
Caption = " 机器名称及其电话号码"
Connect = "Access"
DatabaseName = "E:\vb串口文档\电子警察拍照管理系统\CaptureServer.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000006&
Height = 435
Left = 288
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "tabPostSettings"
Top = 4272
Width = 7164
End
Begin VB.Label Label3
Alignment = 2 'Center
BackColor = &H00C0E0FF&
BorderStyle = 1 'Fixed Single
Caption = "是否工作"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 6048
TabIndex = 3
Top = 240
Width = 1392
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H00C0E0FF&
BorderStyle = 1 'Fixed Single
Caption = "电话号码"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 4584
TabIndex = 1
Top = 240
Width = 1512
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00C0E0FF&
BorderStyle = 1 'Fixed Single
Caption = "机 器 名 称"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 588
TabIndex = 0
Top = 240
Width = 4032
End
End
Attribute VB_Name = "frmClientS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub DBGrid1_MouseDown(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
' Declare variables.
Dim DY, DX, RowValue, ColValue, CellLeft, CellTop
ColValue = DBGrid1.ColContaining(X)
RowValue = DBGrid1.RowContaining(Y)
' Get the height of the cell.
DY = DBGrid1.RowHeight
' Get the width of the cell.
DX = DBGrid1.Columns(ColValue).Width
CellLeft = DBGrid1.Columns(ColValue).Left
CellTop = DBGrid1.RowTop(RowValue)
List1.Move DBGrid1.Left + CellLeft, DBGrid1.Top + CellTop
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then 'Esc
Unload Me
End If
End Sub
Private Sub Form_Load()
Data1.DatabaseName = GetAppPath & "dbCaptureServer.mdb"
List1.ListIndex = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim iAnswer As Integer
iAnswer = MsgBox("确认路口名称和电话号码都正确吗?", vbYesNo, "确定路口名称和电话号码")
If iAnswer = vbNo Then
Cancel = True
DBGrid1.SetFocus
Else
Data1.Refresh
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -