📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmLogin
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Caption = "Login screen"
ClientHeight = 3345
ClientLeft = 0
ClientTop = 0
ClientWidth = 7380
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmLogin.frx":0000
ScaleHeight = 3345
ScaleWidth = 7380
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text2
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
IMEMode = 3 'DISABLE
Left = 5520
PasswordChar = "*"
TabIndex = 3
ToolTipText = "Press Enter to login"
Top = 1400
Width = 1335
End
Begin VB.TextBox Text1
BorderStyle = 0 'None
Height = 210
Left = 3480
TabIndex = 2
Top = 1400
Width = 1335
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "http;//www.mndsoft.com"
Height = 315
Left = 690
TabIndex = 8
Top = 2520
Width = 2130
End
Begin VB.Label Label6
BackColor = &H008CBDDE&
Caption = "系统登录"
Height = 255
Left = 1170
TabIndex = 7
Top = 315
Width = 915
End
Begin VB.Label Label5
BackColor = &H0084CEF7&
Caption = " 取消"
Height = 195
Left = 1185
TabIndex = 6
Top = 1830
Width = 615
End
Begin VB.Label Label3
BackColor = &H0084CEF7&
Caption = "登录"
Height = 300
Left = 1260
TabIndex = 5
Top = 1215
Width = 540
End
Begin VB.Image imgTitlebar
Height = 915
Left = 340
Picture = "frmLogin.frx":3C89
Top = 120
Width = 2370
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "请输入用户名和密码"
Height = 855
Left = 2160
TabIndex = 4
Top = 1200
Width = 1095
End
Begin VB.Image imgLB
Height = 675
Left = 1200
Picture = "frmLogin.frx":472F
Top = 3600
Width = 1125
End
Begin VB.Image imgCB
Height = 615
Left = 3480
Picture = "frmLogin.frx":4CE6
Top = 3720
Width = 1095
End
Begin VB.Image imgCA
Height = 615
Left = 2400
Picture = "frmLogin.frx":52B9
Top = 3720
Width = 1095
End
Begin VB.Image imgLA
Height = 675
Left = 120
Picture = "frmLogin.frx":588C
Top = 3600
Width = 1125
End
Begin VB.Image imgCancel
Height = 615
Left = 910
Picture = "frmLogin.frx":5E43
Top = 1660
Width = 1095
End
Begin VB.Image imgLogin
Height = 675
Left = 880
Picture = "frmLogin.frx":6416
Top = 940
Width = 1125
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密码"
Height = 255
Left = 5400
TabIndex = 1
Top = 1080
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户名"
Height = 255
Left = 3360
TabIndex = 0
Top = 1080
Width = 735
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居
'发布日期:05/06/13
'描 述:一个很酷的登录对话框
'网 站:http://www.mndsoft.com/
'e-mail:mnd@mndsoft.com
'OICQ : 88382850
'****************************************************************************
Option Explicit
Private Sub Form_Load()
DoTransparency Me, vbRed
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = vbBlack
Label5.ForeColor = vbBlack
End Sub
Private Sub imgCancel_Click()
Unload Me
End Sub
Private Sub imgCancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label5.ForeColor = vbWhite
End Sub
Private Sub imgLogin_Click()
CheckIfValid
End Sub
Private Sub imgLogin_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = vbWhite
End Sub
Private Sub imgTitlebar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MoveMe
End Sub
Private Sub imgTitlebar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form_MouseMove Button, Shift, X, Y
End Sub
Private Sub Label3_Click()
CheckIfValid
End Sub
Private Sub Label5_Click()
Unload Me
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Text2.SetFocus
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
CheckIfValid
Else
Exit Sub
End If
End Sub
Private Sub CheckIfValid()
If Text1 & Text2 = "Mndsoft" Then
Unload Me
'载入自己的窗口
Else
MsgBox "名称和密码不正确!", vbCritical, "错误"
End If
End Sub
Private Sub MoveMe()
ReleaseCapture
SendMessage Me.hwnd, &HA1, 2, 0&
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -