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

📄 frmdb.frm

📁 几个不错的VB例子
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDB 
   BorderStyle     =   0  'None
   ClientHeight    =   1290
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1920
   ControlBox      =   0   'False
   BeginProperty Font 
      Name            =   "Verdana"
      Size            =   6.75
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1290
   ScaleWidth      =   1920
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.FileListBox MDBs 
      Appearance      =   0  'Flat
      Height          =   1290
      Left            =   0
      MouseIcon       =   "frmDB.frx":0000
      MousePointer    =   99  'Custom
      Pattern         =   "*.mdb"
      TabIndex        =   0
      Top             =   0
      Width           =   1920
   End
End
Attribute VB_Name = "frmDB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit





Private Sub Form_Load()

    '## Get default database: [Thumbs.mdb]

    MDBs.Path = App.Path
    
    On Error GoTo errDB
    MDBs.ListIndex = 0
    
    Exit Sub
    
errDB:
    
    MsgBox "Database/s not found :" & NL & NL & _
           "Check Database/s path : Thumb DB app. path", _
           vbCritical, _
           "Getting DB"
    End
    
End Sub

Private Sub MDBs_Click()
    
    '## Select database and refresh sources
    
    Dim mdbPath As String
    
    mdbPath = App.Path & "\" & MDBs.FileName
    
    frmMain.DataCategories.DatabaseName = mdbPath
    frmMain.DataCategories.RecordSource = "Select * from tblCategories order by len([IDCat]), [Category]"
    
    frmMain.DataPictures.DatabaseName = mdbPath
    
    frmMain.DataCopy.DatabaseName = mdbPath
    frmMain.DataCopy.RecordSource = "Select * from tblPictures where [IDPict] = -1"
    
    frmAddtoDB.DataPictures.DatabaseName = mdbPath

    Me.Hide
    
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

    If KeyCode = 27 Then Me.Hide

End Sub

⌨️ 快捷键说明

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