?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 3 'Fixed Dialog
Caption = "Login"
ClientHeight = 1590
ClientLeft = 45
ClientTop = 330
ClientWidth = 3750
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1590
ScaleWidth = 3750
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Tag = "Login"
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 360
Left = 2100
TabIndex = 5
Tag = "Cancel"
Top = 1020
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 360
Left = 495
TabIndex = 4
Tag = "OK"
Top = 1020
Width = 1140
End
Begin VB.TextBox txtPassword
Height = 285
IMEMode = 3 'DISABLE
Left = 1305
PasswordChar = "*"
TabIndex = 1
Top = 525
Width = 2325
End
Begin VB.TextBox txtUserName
Height = 285
Left = 1305
TabIndex = 3
Top = 135
Width = 2325
End
Begin VB.Label lblLabels
Caption = "&Password:"
Height = 248
Index = 1
Left = 105
TabIndex = 0
Tag = "&Password:"
Top = 540
Width = 1080
End
Begin VB.Label lblLabels
Caption = "&User Name:"
Height = 248
Index = 0
Left = 105
TabIndex = 2
Tag = "&User Name:"
Top = 150
Width = 1080
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人為我,我為人人
'枕善居漢化收藏整理
'發布日期:2008/01/21
'描 述:手寫字體識別軟件 (v 2.01 beta)
'網 站:http://www.Mndsoft.com/ (VB6源碼博客)
'網 站:http://www.VbDnet.com/ (VB.NET源碼博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代碼別忘記給枕善居哦!
'****************************************************************************
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
Dim counter As Integer
Public OK As Boolean
Private Sub Form_Load()
Dim sBuffer As String
Dim lSize As Long
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetUserName(sBuffer, lSize)
If lSize > 0 Then
txtUserName.Text = Left$(sBuffer, lSize)
Else
txtUserName.Text = vbNullString
End If
End Sub
Private Sub cmdCancel_Click()
OK = False
frmConfirmation.Show vbModal
If frmConfirmation.YES Then
Unload Me
ElseIf Quit = False Then
End If
End Sub
Private Sub cmdOK_Click()
'ToDo: create test for correct password
'check for correct password
If txtPassword.Text = "password" Then
OK = True
Me.Hide
Else
counter = counter + 1
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
txtPassword.SelStart = 0
txtPassword.SelLength = Len(txtPassword.Text)
If counter > 2 Then
MsgBox "User is not allow Attempting to try key in password more than 3 times..."
Unload Me
End If
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -