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

📄 frmsetdatabase.frm

📁 vc++的部分比较经典的源码
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FrmSetDatabase 
   BackColor       =   &H00E0E0E0&
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Set Your Database"
   ClientHeight    =   1860
   ClientLeft      =   45
   ClientTop       =   285
   ClientWidth     =   5340
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1860
   ScaleWidth      =   5340
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin MSComDlg.CommonDialog C1 
      Left            =   1380
      Top             =   780
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command3 
      BackColor       =   &H00E0E0E0&
      Caption         =   "OK"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   3000
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   1470
      Width           =   990
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   4260
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   1470
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Browse"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   4350
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   285
      Width           =   900
   End
   Begin VB.TextBox Text1 
      Height          =   330
      Left            =   135
      TabIndex        =   0
      Top             =   285
      Width           =   4185
   End
   Begin VB.Line Line2 
      X1              =   135
      X2              =   5250
      Y1              =   1320
      Y2              =   1320
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      BorderWidth     =   2
      X1              =   150
      X2              =   5235
      Y1              =   1335
      Y2              =   1335
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Type or Select the path of the database"
      Height          =   195
      Left            =   165
      TabIndex        =   2
      Top             =   30
      Width           =   2820
   End
End
Attribute VB_Name = "FrmSetDatabase"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
C1.ShowOpen
C1.DialogTitle = "Select Access Database"
Text1.Text = C1.FileName
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
If Len(Text1.Text) < 1 Then
    MsgBox "Please specify the path of any access database for searching, which having extension of (.mdb)"
    Exit Sub
End If
If Len(Text1.Text) >= 1 Then
    If LCase(Mid(Text1.Text, Len(Text1.Text) - 3, 4)) <> ".mdb" Then
        Debug.Print Mid(Text1.Text, Len(Text1.Text) - 3, 4)
        MsgBox "Please specify the path of any access database for searching, which having extension of (.mdb)"
        Exit Sub
    End If
End If
If Len(Text1.Text) >= 1 Then
    If Mid(Text1.Text, Len(Text1.Text) - 11, 12) = "keywords.mdb" Then
        Debug.Print Mid(Text1.Text, Len(Text1.Text) - 11, 12)
        MsgBox "Please specify the path of main Access database for searching, which having extension of (.mdb), You specify the path of  KEYWORDS.MDB  it can not be used as Main database, Choose other database."
    Exit Sub
    End If
End If

SaveSetting "DataSearch", "Data", "Path", Text1.Text
Unload Me
End Sub

Private Sub Form_Load()
Me.Top = (Screen.Height - Me.Height) / 2
Me.Left = (Screen.Width - Me.Width) / 2
Text1.Text = GetSetting("DataSearch", "Data", "Path")
End Sub

⌨️ 快捷键说明

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