📄 登陆窗体.frm
字号:
VERSION 5.00
Begin VB.Form form3
Caption = "登陆系统"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2280
TabIndex = 5
Top = 2160
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 360
TabIndex = 4
Top = 2160
Width = 1335
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 3
Top = 1080
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
Left = 1560
TabIndex = 2
Top = 480
Width = 1695
End
Begin VB.Label Label2
Caption = "密 码:"
Height = 375
Left = 480
TabIndex = 1
Top = 1080
Width = 855
End
Begin VB.Label Label1
Caption = "教师名:"
Height = 375
Left = 480
TabIndex = 0
Top = 480
Width = 855
End
End
Attribute VB_Name = "form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
bytemp = jiao(Text1.Text, Text2.Text)
If bytemp = 1 Then
Form1.Visible = True
form3.Visible = False
Form1.List1.AddItem ("服务器:开启本次服务的教师是:" & Text1.Text)
Print #3, "服务器:开启本次服务的教师是:" & Text1.Text & Chr(16) & Chr(17)
Form1.List1.ListIndex = Form1.List1.ListCount - 1
' Install the new WindowProc.
Form1.indexmnu.Visible = False
OldProc = SetWindowLong(Form1.hwnd, GWL_WNDPROC, AddressOf NewProc)
' Install the form's icon in the tray.
With TheData
.uID = 0
.hwnd = Form1.hwnd
.cbSize = Len(TheData)
.hIcon = Form1.Icon
.uFlags = NIF_ICON
.uCallbackMessage = TRAY_CALLBACK
.uFlags = .uFlags Or NIF_MESSAGE
.cbSize = Len(TheData)
End With
Shell_NotifyIcon NIM_ADD, TheData
With TheData
.szTip = "绝龙考试系统" & vbNullChar
.uFlags = NIF_TIP
End With
Shell_NotifyIcon NIM_MODIFY, TheData
Else
MsgBox "username or password as error"
form3.Text1.Text = ""
form3.Text2.Text = ""
form3.Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
bytemp = jiao(Text1.Text, Text2.Text)
If bytemp = 1 Then
Form1.Visible = True
form3.Visible = False
Form1.List1.AddItem ("服务器:开启本次服务的教师是:" & Text1.Text)
Print #3, "服务器:开启本次服务的教师是:" & Text1.Text & Chr(16) & Chr(17)
Form1.List1.ListIndex = Form1.List1.ListCount - 1
' Install the new WindowProc.
Form1.indexmnu.Visible = False
OldProc = SetWindowLong(Form1.hwnd, GWL_WNDPROC, AddressOf NewProc)
' Install the form's icon in the tray.
With TheData
.uID = 0
.hwnd = Form1.hwnd
.cbSize = Len(TheData)
.hIcon = Form1.Icon
.uFlags = NIF_ICON
.uCallbackMessage = TRAY_CALLBACK
.uFlags = .uFlags Or NIF_MESSAGE
.cbSize = Len(TheData)
End With
Shell_NotifyIcon NIM_ADD, TheData
With TheData
.szTip = "绝龙考试系统" & vbNullChar
.uFlags = NIF_TIP
End With
Shell_NotifyIcon NIM_MODIFY, TheData
Else
MsgBox "username or password as error"
form3.Text1.Text = ""
form3.Text2.Text = ""
form3.Text1.SetFocus
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -