⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmclientset.frm

📁 一本关于VB串口编程的详细参考资料
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frmClientSet 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "确定岗亭名称及其电话号码"
   ClientHeight    =   4875
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7785
   DrawWidth       =   2
   BeginProperty Font 
      Name            =   "楷体_GB2312"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmClientSet.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4875
   ScaleWidth      =   7785
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.ListBox List1 
      Height          =   480
      ItemData        =   "frmClientSet.frx":030A
      Left            =   120
      List            =   "frmClientSet.frx":0314
      TabIndex        =   5
      Top             =   3840
      Visible         =   0   'False
      Width           =   1368
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "frmClientSet.frx":0325
      Height          =   3600
      Left            =   252
      OleObjectBlob   =   "frmClientSet.frx":0339
      TabIndex        =   3
      Top             =   600
      Width           =   7188
   End
   Begin VB.CommandButton Command1 
      Appearance      =   0  'Flat
      BackColor       =   &H00FFC0C0&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   324
      Left            =   240
      Picture         =   "frmClientSet.frx":0EF8
      Style           =   1  'Graphical
      TabIndex        =   2
      TabStop         =   0   'False
      ToolTipText     =   "退出"
      Top             =   216
      Width           =   348
   End
   Begin VB.Data Data1 
      BackColor       =   &H00FF8080&
      Caption         =   "         岗亭名称及其电话号码"
      Connect         =   "Access"
      DatabaseName    =   "F:\CaptureServerV2.0\dbCaptureServer.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       =   &H00FF8080&
      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        =   4
      Top             =   240
      Width           =   1392
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackColor       =   &H00FF8080&
      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       =   &H00FF8080&
      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 = "frmClientSet"
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 + -