📄 frmmain.frm
字号:
VERSION 5.00
Begin VB.Form FrmMain
BorderStyle = 1 'Fixed Single
Caption = "图书管理系统"
ClientHeight = 3390
ClientLeft = 45
ClientTop = 435
ClientWidth = 4020
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3390
ScaleWidth = 4020
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command4
Caption = "关于"
Height = 495
Left = 1440
TabIndex = 4
Top = 2520
Width = 2175
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 495
Left = 1440
TabIndex = 3
Top = 1800
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "登陆"
Height = 495
Left = 1440
TabIndex = 2
Top = 1080
Width = 2175
End
Begin VB.CommandButton Command1
Caption = "图书查询"
Height = 495
Left = 1440
TabIndex = 1
Top = 360
Width = 2175
End
Begin VB.Label Label1
Caption = "图书管理系统"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 480
TabIndex = 0
Top = 360
Width = 615
End
End
Attribute VB_Name = "FrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo goywc
Call connect_db
With FrmUser
.Label1.Caption = "游客"
.SSTab.TabEnabled(0) = False
.SSTab.TabEnabled(1) = False
.SSTab.Tab = 2
.Command6.Caption = "退出"
.Height = 6720
.Picture1.Visible = False
.Picture2.Visible = True
.Picture3.Visible = True
.Picture2.Top = 960
.DataGrid1.Height = 4350
.DataGrid1.Top = 450
End With
Call sel_table("Books", "")
Set FrmUser.DataGrid1.DataSource = rst
With FrmUser
.DataGrid1.Columns(0).Caption = "图书编号"
.DataGrid1.Columns(1).Caption = "书名"
.DataGrid1.Columns(2).Caption = "类型"
.DataGrid1.Columns(3).Caption = "作者"
.DataGrid1.Columns(4).Caption = "出版社"
.DataGrid1.Columns(5).Caption = "出版日期"
.DataGrid1.Columns(6).Caption = "图书简介"
.Label9.Caption = "一共有" & rst.RecordCount & "本书"
End With
Unload Me
FrmUser.Show
Exit Sub
goywc:
MsgBox ("连接数据库失败")
End Sub
Private Sub Command2_Click()
FrmLogin.Show 1
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
FrmAbu.Show 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -