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

📄 propwin.frm

📁 全球定位系统GPS_卫星定位_VB源码+使用说明
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPropertyWindow 
   ClientHeight    =   5670
   ClientLeft      =   465
   ClientTop       =   1650
   ClientWidth     =   4515
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   5670
   ScaleWidth      =   4515
   ShowInTaskbar   =   0   'False
   Begin VB.Data oData 
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   300
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   2  'Snapshot
      RecordSource    =   ""
      Top             =   5325
      Visible         =   0   'False
      Width           =   4455
   End
End
Attribute VB_Name = "frmPropertyWindow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private m_strOIDField As String

Public Sub ShowCurrentEntity(ByVal lEntityOID As Long, ByVal strTableName As String, ByVal strOIDField As String)
    Dim i As Integer
    If oData.RecordSource <> strTableName Then
        oData.Connect = MDIMainForm.oSpaDB.DBDriverType
        oData.DatabaseName = MDIMainForm.oSpaDB.DBSourceName
        oData.RecordSource = strTableName
        m_strOIDField = strOIDField
        oData.Refresh
        For i = 0 To oDBGrid.Columns.Count - 1
            If oDBGrid.Columns.Item(i).Caption = strOIDField Then
                oDBGrid.Columns.Item(i).Visible = False
                Exit For
            End If
        Next
    End If
    
    If TypeName(oData.Recordset) = "Nothing" Then
        Exit Sub
    End If
    
    oData.Recordset.FindFirst strOIDField & "=" & lEntityOID
End Sub

Private Sub Form_Load()
    'SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3
End Sub

Private Sub Form_Resize()
    If Me.ScaleWidth <= 0 Or Me.ScaleHeight - oDBGrid.top <= 0 Then
        Exit Sub
    End If
    oDBGrid.Width = Me.ScaleWidth
    oDBGrid.Height = Me.ScaleHeight - oDBGrid.top
End Sub

Private Sub oDBGrid_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
    Dim strOIDField As String
    If TypeName(oData.Recordset) = "Nothing" Then
        Exit Sub
    End If
    If oDBGrid.Bookmark = LastRow Then
        Exit Sub
    End If
    On Error GoTo errhandle
    
    MonitorForm.SetFocusEntity oData.Recordset.Fields(m_strOIDField)
errhandle:
    Exit Sub
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -