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

📄 main_zscx.frm

📁 这个原代码书上有,但是我把它做出来,与大家共享,希望大家喜欢
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form main_zscx 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "住宿查询"
   ClientHeight    =   3645
   ClientLeft      =   45
   ClientTop       =   705
   ClientWidth     =   7920
   Icon            =   "main_zscx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3645
   ScaleWidth      =   7920
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "D:\VB数据库开发实例解析\程序\宾馆客房管理系统\Kfgl.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   -555
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "djb"
      Top             =   855
      Visible         =   0   'False
      Width           =   1350
   End
   Begin VB.Frame Frame1 
      Height          =   675
      Left            =   60
      TabIndex        =   0
      Top             =   -15
      Width           =   7815
      Begin VB.TextBox Text2 
         Height          =   360
         Left            =   -15
         TabIndex        =   6
         Top             =   270
         Visible         =   0   'False
         Width           =   285
      End
      Begin VB.TextBox Text1 
         Height          =   345
         Left            =   975
         TabIndex        =   4
         Top             =   210
         Width           =   3135
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "查询"
         Height          =   330
         Left            =   4470
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   225
         Width           =   1500
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H00C0C0C0&
         Caption         =   "退出"
         Height          =   330
         Left            =   6150
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   195
         Width           =   1500
      End
      Begin VB.Label Label1 
         Caption         =   "姓名:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   300
         TabIndex        =   1
         Top             =   270
         Width           =   915
      End
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "main_zscx.frx":000C
      Height          =   2760
      Left            =   90
      OleObjectBlob   =   "main_zscx.frx":0020
      TabIndex        =   5
      Top             =   765
      Width           =   7815
   End
End
Attribute VB_Name = "main_zscx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 Data1.DatabaseName = App.Path & "\Kfgl.MDB"     '自动识别数据库路径
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
End Sub
Private Sub Command1_Click()     '查询住宿信息
 Data1.RecordSource = "select * from djb where 姓名 like " + Chr(34) + Text1.Text + "*" + Chr(34) + ""
 Data1.Refresh
End Sub
Private Sub Command2_Click()
 main.Enabled = True
 Unload Me
End Sub

⌨️ 快捷键说明

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