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

📄 form1.frm

📁 本文件包含200个visual baisc实例
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form FORM1 
   BackColor       =   &H00C0C0C0&
   Caption         =   "利用拼音简码进行数据查询"
   ClientHeight    =   7845
   ClientLeft      =   315
   ClientTop       =   465
   ClientWidth     =   11385
   LinkTopic       =   "Form1"
   ScaleHeight     =   7845
   ScaleWidth      =   11385
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Bindings        =   "FORM1.frx":0000
      Height          =   6090
      Left            =   2490
      TabIndex        =   29
      Top             =   1260
      Width           =   8805
      _ExtentX        =   15531
      _ExtentY        =   10742
      _Version        =   393216
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "退出"
      Height          =   375
      Left            =   9075
      Style           =   1  'Graphical
      TabIndex        =   27
      Top             =   7425
      Width           =   2205
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "E:\明日vb编程500例\数据库\利用简码查询公司\kjc.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   3720
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "kjcgs"
      Top             =   7560
      Visible         =   0   'False
      Width           =   1635
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "公司信息查询"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   720
      Left            =   5160
      TabIndex        =   28
      Top             =   390
      Width           =   4530
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   570
      Index           =   26
      Left            =   1650
      TabIndex        =   26
      Top             =   7110
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   25
      Left            =   945
      TabIndex        =   25
      Top             =   7080
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   24
      Left            =   225
      TabIndex        =   24
      Top             =   7050
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   600
      Index           =   23
      Left            =   1680
      TabIndex        =   23
      Top             =   6315
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   22
      Left            =   930
      TabIndex        =   22
      Top             =   6345
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   21
      Left            =   240
      TabIndex        =   21
      Top             =   6315
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   20
      Left            =   1635
      TabIndex        =   20
      Top             =   5625
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   19
      Left            =   960
      TabIndex        =   19
      Top             =   5625
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   18
      Left            =   225
      TabIndex        =   18
      Top             =   5640
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   17
      Left            =   1635
      TabIndex        =   17
      Top             =   4905
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   540
      Index           =   0
      Left            =   165
      TabIndex        =   16
      Top             =   1320
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   1
      Left            =   915
      TabIndex        =   15
      Top             =   1350
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   2
      Left            =   1635
      TabIndex        =   14
      Top             =   1350
      Width           =   570
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   510
      Index           =   3
      Left            =   180
      TabIndex        =   13
      Top             =   2085
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   495
      Index           =   4
      Left            =   945
      TabIndex        =   12
      Top             =   2085
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   510
      Index           =   5
      Left            =   1650
      TabIndex        =   11
      Top             =   2070
      Width           =   600
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   6
      Left            =   210
      TabIndex        =   10
      Top             =   2775
      Width           =   600
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   570
      Index           =   7
      Left            =   915
      TabIndex        =   9
      Top             =   2760
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   570
      Index           =   8
      Left            =   1635
      TabIndex        =   8
      Top             =   2775
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   9
      Left            =   180
      TabIndex        =   7
      Top             =   3495
      Width           =   600
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   540
      Index           =   10
      Left            =   930
      TabIndex        =   6
      Top             =   3495
      Width           =   585
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   570
      Index           =   11
      Left            =   1605
      TabIndex        =   5
      Top             =   3495
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   540
      Index           =   13
      Left            =   885
      TabIndex        =   4
      Top             =   4215
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   12
      Left            =   180
      TabIndex        =   3
      Top             =   4215
      Width           =   615
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   14
      Left            =   1635
      TabIndex        =   2
      Top             =   4200
      Width           =   570
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   555
      Index           =   15
      Left            =   225
      TabIndex        =   1
      Top             =   4920
      Width           =   600
   End
   Begin VB.Label lab 
      BackStyle       =   0  'Transparent
      Height          =   585
      Index           =   16
      Left            =   945
      TabIndex        =   0
      Top             =   4890
      Width           =   585
   End
   Begin VB.Image Image1 
      Height          =   8100
      Left            =   -60
      Picture         =   "FORM1.frx":0014
      Top             =   -45
      Width           =   2505
   End
End
Attribute VB_Name = "FORM1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
  MSFlexGrid1.ColWidth(0) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(1) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(2) = 12 * 25 * 12
  MSFlexGrid1.ColWidth(3) = 12 * 25 * 16
  MSFlexGrid1.ColWidth(4) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(5) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(6) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(7) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(8) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(9) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(10) = 12 * 25 * 0
  MSFlexGrid1.ColWidth(11) = 12 * 25 * 0
End Sub
Private Sub Form_Load()
  Data1.DatabaseName = App.Path & "\kjc.mdb"
  Data1.Connect = ";pwd=" & 73322
  Dim lab(28) As Byte
End Sub
Private Sub lab_Click(Index As Integer)
  Select Case Index
   Case 0
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "a" + "*" + Chr(34) + ")"
   Case 1
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "b" + "*" + Chr(34) + ")"
   Case 2
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "c" + "*" + Chr(34) + ")"
   Case 3
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "d" + "*" + Chr(34) + ")"
   Case 4
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "e" + "*" + Chr(34) + ")"
   Case 5
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "f" + "*" + Chr(34) + ")"
   Case 6
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "g" + "*" + Chr(34) + ")"
   Case 7
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "h" + "*" + Chr(34) + ")"
   Case 8
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "i" + "*" + Chr(34) + ")"
   Case 9
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "j" + "*" + Chr(34) + ")"
   Case 10
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "k" + "*" + Chr(34) + ")"
   Case 11
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "l" + "*" + Chr(34) + ")"
   Case 12
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "m" + "*" + Chr(34) + ")"
   Case 13
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "n" + "*" + Chr(34) + ")"
   Case 14
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "o" + "*" + Chr(34) + ")"
   Case 15
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "p" + "*" + Chr(34) + ")"
   Case 16
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "q" + "*" + Chr(34) + ")"
   Case 17
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "r" + "*" + Chr(34) + ")"
   Case 18
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "s" + "*" + Chr(34) + ")"
   Case 19
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "t" + "*" + Chr(34) + ")"
   Case 20
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "u" + "*" + Chr(34) + ")"
   Case 21
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "v" + "*" + Chr(34) + ")"
   Case 22
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "w" + "*" + Chr(34) + ")"
   Case 23
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "x" + "*" + Chr(34) + ")"
   Case 24
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "y" + "*" + Chr(34) + ")"
   Case 25
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "z" + "*" + Chr(34) + ")"
   Case 26
     Data1.RecordSource = "select * from kjcgs  where (kjcgs.jc like " + Chr(34) + "*" + Chr(34) + ")"
  End Select
  Data1.Refresh
End Sub
Private Sub lab_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  For i = 0 To 26
      lab(i).BorderStyle = 0
  Next i
  lab(Index).BorderStyle = 1
End Sub
Private Sub Command1_Click()
  End
End Sub

⌨️ 快捷键说明

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