📄 frmuserlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmUserLogin
BorderStyle = 4 'Fixed ToolWindow
Caption = "域登录"
ClientHeight = 1890
ClientLeft = 45
ClientTop = 285
ClientWidth = 3945
Icon = "frmUserLogin.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1890
ScaleWidth = 3945
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2760
TabIndex = 7
Top = 1350
Width = 1005
End
Begin VB.TextBox txtDomain
Height = 345
Left = 1050
TabIndex = 5
Top = 810
Width = 2715
End
Begin VB.TextBox txtPassword
Height = 345
IMEMode = 3 'DISABLE
Left = 1050
PasswordChar = "*"
TabIndex = 3
Top = 420
Width = 2715
End
Begin VB.TextBox txtUserName
Height = 345
Left = 1050
TabIndex = 1
Top = 30
Width = 2715
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1770
TabIndex = 6
Top = 1350
Width = 1005
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "域名"
Height = 180
Left = 360
TabIndex = 4
Top = 840
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "密码"
Height = 180
Left = 360
TabIndex = 2
Top = 480
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "用户名"
Height = 180
Left = 180
TabIndex = 0
Top = 60
Width = 540
End
End
Attribute VB_Name = "frmUserLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Sub OpenCommunication(ParentForm As Form, commtype As Byte, ParamArray X())
Select Case commtype
Case 0
txtUserName.Text = X(0)
txtPassword.Text = X(1)
txtDomain.Text = X(2)
txtDomain.Enabled = False
txtDomain.BackColor = vbTransparant
Me.Show vbModal
Case 1
txtUserName.Text = X(0)
txtPassword.Text = X(1)
txtDomain.Text = X(2)
txtUserName.Enabled = False
txtUserName.BackColor = vbTransparant
txtDomain.Enabled = False
txtDomain.BackColor = vbTransparant
Me.Show vbModal
End Select
End Sub
Private Sub Command1_Click()
LoginSet = True
LoginOpen = False
Me.Hide
End Sub
Private Sub Command2_Click()
LoginSet = False
LoginOpen = False
Me.Hide
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{Tab}"
ElseIf KeyAscii = vbKeyEscape Then
LoginSet = False
LoginOpen = False
Me.Hide
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
LoginSet = False
LoginOpen = False
End Sub
Private Sub txtUserName_LostFocus()
txtUserName = LCase(txtUserName)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -