?? form1.frm
字號:
VERSION 5.00
Begin VB.Form 登陸
BackColor = &H80000001&
Caption = "登陸"
ClientHeight = 4500
ClientLeft = 5385
ClientTop = 3075
ClientWidth = 6135
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4500
ScaleWidth = 6135
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\圖書管理系統\圖書館管理信息系統.mdb"
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 1320
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "Username"
Top = 3240
Visible = 0 'False
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "取 消"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4080
TabIndex = 6
Top = 3600
Width = 1215
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 2400
PasswordChar = "*"
TabIndex = 5
Top = 2520
Width = 2895
End
Begin VB.TextBox Text1
Height = 495
Left = 2400
TabIndex = 4
Top = 1680
Width = 2895
End
Begin VB.CommandButton Command1
Caption = "確 定"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 1
Top = 3600
Width = 1215
End
Begin VB.Label Label3
BackColor = &H80000001&
Caption = "密 碼 :"
BeginProperty Font
Name = "華文新魏"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 3
Top = 2520
Width = 1455
End
Begin VB.Label Label2
BackColor = &H80000001&
Caption = "用戶名 :"
BeginProperty Font
Name = "華文新魏"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 2
Top = 1680
Width = 1455
End
Begin VB.Label Label1
BackColor = &H80000001&
Caption = "圖書館管理信息系統"
BeginProperty Font
Name = "華文新魏"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 855
Left = 600
TabIndex = 0
Top = 360
Width = 5175
End
End
Attribute VB_Name = "登陸"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
Data1.Refresh
Do While Not Data1.Recordset.EOF
If Trim(Text1.Text) = Trim(Data1.Recordset("姓名")) Then
If Trim(Text2.Text) = Trim(Data1.Recordset("密碼")) Then
MDIForm1.Show
Unload Me
Exit Sub
Else
MsgBox "密碼不正確", 0 + 48, "警告"
Text2.Text = ""
Text1.SetFocus
Exit Sub
End If
Else
Data1.Recordset.MoveNext
End If
Loop
MsgBox "無此用戶", 0 + 48, "警告"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim dbname As String
Dim sql As String
dbname = App.Path
If Right$(dbname, 1) <> "\" Then dbname = dbname & "\"
dbname = dbname & "圖書館管理信息系統.mdb"
Data1.DatabaseName = dbname
sql = "select * from " & "Username"
Data1.RecordSource = sql
Data1.Refresh
Data1.Recordset.MoveFirst
Data1.Recordset.Edit
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -