📄 1.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form Form4
BorderStyle = 1 'Fixed Single
Caption = " DataGrid 查询"
ClientHeight = 7980
ClientLeft = 45
ClientTop = 615
ClientWidth = 11910
ForeColor = &H8000000F&
Icon = "1.frx":0000
LinkTopic = "Form4"
MaxButton = 0 'False
ScaleHeight = 7980
ScaleWidth = 11910
Begin VB.PictureBox rpt2
Height = 480
Left = 1200
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 2
Top = 6600
Width = 1200
End
Begin VB.PictureBox rpt1
Height = 480
Left = 480
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 3
Top = 6600
Width = 1200
End
Begin MSDBGrid.DBGrid DBGrid2
Bindings = "1.frx":0442
Height = 7935
Left = 0
OleObjectBlob = "1.frx":0456
TabIndex = 1
Top = 0
Width = 11895
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = "C:\人事管理系统\data\rsda.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 1560
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "gzb"
Top = 7920
Visible = 0 'False
Width = 1140
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\人事管理系统\data\rsda.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "rsda"
Top = 7800
Visible = 0 'False
Width = 1140
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "1.frx":0E19
Height = 7935
Left = 0
OleObjectBlob = "1.frx":0E2D
TabIndex = 0
Top = 0
Width = 11895
End
Begin VB.Image Image1
Height = 255
Left = 5400
Picture = "1.frx":17F0
Stretch = -1 'True
Top = 3720
Visible = 0 'False
Width = 255
End
Begin VB.Image Imagprint
Height = 240
Left = 480
Picture = "1.frx":18F2
Top = 8280
Visible = 0 'False
Width = 240
End
Begin VB.Menu mnuprint
Caption = "打印(&P)"
Begin VB.Menu mnul
Caption = "履历表(&L)"
Shortcut = ^L
End
Begin VB.Menu mnus
Caption = "工资表(&S)"
Shortcut = ^S
End
End
Begin VB.Menu mnuin
Caption = "履历表(&L)"
End
Begin VB.Menu mnut
Caption = "工资表(&T)"
End
Begin VB.Menu mnuexit
Caption = "退出(&X)"
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
Const myflag = &H800&
Private Sub Form_Load()
Dim mhandle As Long, lret As Long, shandle As Long
mhandle = GetMenu(hwnd)
shandle = GetSubMenu(mhandle, 0)
lret = SetMenuItemBitmaps(shandle, 2, myflag, Image1.Picture, Image1.Picture)
lret = SetMenuItemBitmaps(shandle, 3, myflag, Image1.Picture, Image1.Picture)
DBGrid2.Visible = False
End Sub
Private Sub mnuexit_Click()
Unload Me
End Sub
Private Sub mnuin_Click()
DBGrid1.Visible = True
DBGrid2.Visible = False
End Sub
Private Sub mnul_Click()
On Error GoTo a0
rpt1.Action = 1
a0:
End Sub
Private Sub mnus_Click()
On Error GoTo a0
rpt2.Action = 1
a0:
End Sub
Private Sub mnut_Click()
DBGrid2.Visible = True
DBGrid1.Visible = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -