?? 主界面.frm
字號:
VERSION 5.00
Begin VB.Form 主界面
Caption = "圖書館管理系統"
ClientHeight = 6615
ClientLeft = 165
ClientTop = 555
ClientWidth = 9345
LinkTopic = "Form1"
ScaleHeight = 6615
ScaleWidth = 9345
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Caption = "讀者所借書籍"
Height = 3255
Left = 3840
TabIndex = 10
Top = 2160
Width = 5295
Begin VB.TextBox Text6
Height = 2655
Left = 600
MultiLine = -1 'True
TabIndex = 17
Top = 360
Width = 4335
End
End
Begin VB.TextBox Text5
Height = 375
Left = 1440
TabIndex = 13
Top = 4440
Width = 2055
End
Begin VB.TextBox Text4
Height = 375
Left = 1440
TabIndex = 12
Top = 3480
Width = 2055
End
Begin VB.TextBox Text3
Height = 375
Left = 1440
TabIndex = 11
Top = 2640
Width = 2055
End
Begin VB.TextBox Text2
Height = 300
Left = 3720
MousePointer = 3 'I-Beam
TabIndex = 9
Top = 1680
Width = 2535
End
Begin VB.CommandButton Command2
Caption = "go"
Default = -1 'True
Height = 300
Left = 6240
TabIndex = 8
Top = 1680
Width = 735
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "主界面.frx":0000
Left = 1200
List = "主界面.frx":0016
TabIndex = 6
Top = 1680
Width = 2535
End
Begin VB.Frame Frame1
Caption = "操作信息"
Height = 975
Left = 0
TabIndex = 4
Top = 5520
Width = 9375
Begin VB.TextBox Text1
Height = 270
Left = 360
TabIndex = 5
Top = 360
Width = 8295
End
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 1215
Index = 3
Left = 6360
TabIndex = 3
TabStop = 0 'False
Top = 0
Width = 1695
End
Begin VB.CommandButton Command1
Caption = " 借閱/還書"
Height = 1215
Index = 2
Left = 4680
TabIndex = 2
TabStop = 0 'False
Top = 0
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "讀者管理"
Height = 1215
Index = 1
Left = 3000
TabIndex = 1
TabStop = 0 'False
Top = 0
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "書籍管理"
Height = 1215
Index = 0
Left = 1320
TabIndex = 0
TabStop = 0 'False
Top = 0
Width = 1695
End
Begin VB.Label Label4
Height = 375
Left = 240
TabIndex = 16
Top = 4440
Width = 975
End
Begin VB.Label Label3
Height = 375
Left = 240
TabIndex = 15
Top = 3480
Width = 975
End
Begin VB.Label Label2
Height = 375
Left = 240
TabIndex = 14
Top = 2640
Width = 975
End
Begin VB.Label Label1
Caption = "精確查詢"
Height = 255
Left = 120
TabIndex = 7
Top = 1680
Width = 1095
End
Begin VB.Menu mdd
Caption = "文件"
Begin VB.Menu exit
Caption = "退出"
End
End
Begin VB.Menu mbb
Caption = "編輯"
Begin VB.Menu 設置
Caption = "設置"
End
End
Begin VB.Menu hpp
Caption = "幫助"
Begin VB.Menu gy
Caption = "關于"
End
End
End
Attribute VB_Name = "主界面"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Text2.Text = ""
Text2.SetFocus
End Sub
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
書籍管理.Show
Case 1
讀者管理.Show
Case 2
借閱.Show
Case 3
m = MsgBox("確認退出?", vbOKCancel, "圖書館管理系統")
If m = 1 Then Unload Me
End Select
End Sub
Private Sub Command2_Click()
Text6.Text = ""
If Text2.Text = "" Or Combo1.Text = "" Then
MsgBox ("該項不能為空")
Text2.SetFocus
Else
Set db = OpenDatabase(App.Path & "\圖書001")
If Combo1.Text = Combo1.List(0) Then
Set rs = db.OpenRecordset("select * from 圖書 where 圖書名稱 = '" & Trim(Text2.Text) & "'")
End If
If Combo1.Text = Combo1.List(1) Then
Set rs = db.OpenRecordset("select * from 讀者 where 讀者姓名 ='" & Trim(Text2.Text) & "'")
End If
If Combo1.Text = Combo1.List(2) Then
Set rs = db.OpenRecordset("select * from 圖書 where 圖書編號 ='" & Trim(Text2.Text) & "'")
End If
If Combo1.Text = Combo1.List(3) Then
Set rs = db.OpenRecordset("select * from 圖書 where 作者 = '" & Trim(Text2.Text) & "'")
End If
If Combo1.Text = Combo1.List(4) Then
Set rs = db.OpenRecordset("select * from 讀者 where 借書證編號 = '" & Trim(Text2.Text) & "'")
End If
If Combo1.Text = Combo1.List(5) Then
Set rs = db.OpenRecordset("select * from 圖書 where 出版社 = '" & Trim(Text2.Text) & "'")
End If
If rs.EOF = True And rs.BOF = True Then
MsgBox ("sorry 查找失?。?quot;)
Text2.Text = ""
Else
If Combo1.Text = Combo1.List(1) Or Combo1.Text = Combo1.List(4) Then
Label2.Caption = " 讀者姓名"
Label3.Caption = "借書證編號"
Label4.Caption = "當前借書量"
Text3.Text = rs.讀者姓名
Text4.Text = rs.借書證編號
Text5.Text = rs.當前借書量
Set rs1 = db.OpenRecordset("select * from 圖書 where 狀態 = '" & Text4.Text & "'")
Dim s As String
s = ""
For t = 0 To Val(rs1.RecordCount) - 1
s = s + "圖書名稱: " + rs1.圖書名稱 + vbCrLf
Next t
Text6.Text = s
rs1.Close
Else
Label2.Caption = "圖書名稱"
Label3.Caption = "圖書編號"
Label4.Caption = "狀態"
Text3.Text = rs.圖書名稱
Text4.Text = rs.圖書編號
If rs.狀態 <> "在館" Then
Text5.Text = "借出"
Else
Text5.Text = rs.狀態
End If
End If
rs.Close
End If
Text1.Text = "查詢成功"
End If
End Sub
Private Sub exit_Click()
m = MsgBox("確認退出?", vbOKCancel, "圖書館管理系統")
If m = 1 Then End
End Sub
Private Sub Form_Load()
Combo1.Text = Combo1.List(1)
End Sub
Private Sub Frame3_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
Private Sub gy_Click()
關于.Show
End Sub
Private Sub 設置_Click()
P設置.Show
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -