?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form FrmLogin
Caption = "登錄"
ClientHeight = 3120
ClientLeft = 60
ClientTop = 450
ClientWidth = 5070
LinkTopic = "Form1"
ScaleHeight = 3120
ScaleWidth = 5070
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Cmdcancel_click
Caption = "取消"
Height = 495
Left = 2880
TabIndex = 5
Top = 2160
Width = 1215
End
Begin VB.CommandButton Cmdok_click
Caption = "確定"
Height = 495
Left = 960
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.TextBox txtpassword
Height = 495
Left = 1800
TabIndex = 3
Top = 1200
Width = 2535
End
Begin VB.TextBox txtname
Height = 495
Left = 1800
TabIndex = 2
Top = 360
Width = 2535
End
Begin VB.Label Label2
Caption = "密碼"
Height = 495
Left = 360
TabIndex = 1
Top = 1320
Width = 1215
End
Begin VB.Label Label1
Caption = "輸入人名"
Height = 495
Left = 360
TabIndex = 0
Top = 480
Width = 1215
End
End
Attribute VB_Name = "FrmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public loginsucceeded As Boolean
Private Sub Cmdcancel_click_Click()
loginsucceeded = False
Me.Hide
End
End Sub
Private Sub Cmdok_click_Click()
Dim i As Integer
loginsucceeded = False
If txtpassword.Text = "123" Then
For i = 1 To 10
If txtname.Text = arrname(i) Then
loginsucceeded = True
Exit For
End If
Next i
If loginsucceeded = True Then
Me.Hide
Frmqueery.Show
Else
MsgBox "查無此人,請重新查詢", , "警告"
End If
Else
MsgBox "無效的密碼,再試一次!", , "登錄"
txtpassword.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 10
arrname(i) = "p" & i
Next i
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -