📄 登录.frm
字号:
VERSION 5.00
Begin VB.Form Form3
AutoRedraw = -1 'True
Caption = "登录"
ClientHeight = 4770
ClientLeft = 60
ClientTop = 345
ClientWidth = 7035
Icon = "登录.frx":0000
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 4770
ScaleWidth = 7035
StartUpPosition = 2 '屏幕中心
Begin VB.Timer Timer1
Interval = 2000
Left = 6360
Top = 4200
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 405
Left = 3360
TabIndex = 5
Top = 1680
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3840
TabIndex = 4
Top = 3000
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 2520
TabIndex = 3
Top = 3000
Width = 855
End
Begin VB.TextBox Text2
DataField = "name"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
IMEMode = 3 'DISABLE
Left = 3360
PasswordChar = "*"
TabIndex = 2
Text = "Text2"
Top = 2400
Width = 1455
End
Begin VB.Label Label3
Alignment = 2 'Center
Height = 495
Left = 1560
TabIndex = 7
Top = 3960
Width = 4335
End
Begin VB.Label welcome
Alignment = 2 'Center
BackColor = &H8000000A&
Caption = "欢迎使用医院工资管理系统"
BeginProperty Font
Name = "隶书"
Size = 24.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 1080
TabIndex = 6
Top = 240
Width = 5280
WordWrap = -1 'True
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "密 码:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Left = 2040
TabIndex = 1
Top = 2400
Width = 1455
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "用户名:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 405
Left = 2040
TabIndex = 0
Top = 1680
Width = 1455
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, j, a, b, c As Integer
Dim rs As New ADODB.Recordset
Private Sub Combo1_Change()
user = Combo1.Text
End Sub
Private Sub Command1_Click()
If Text2.Text = rs("密码") Then
Unload Me '关闭登录窗口
Form4.Show '显示主窗口
Else
MsgBox "密码不正确,请重新输入!", 48, "提示"
Text2.SetFocus
Text2.Text = ""
i = i + 1
If i = 3 Then
MsgBox "您无权使用本系统,谢谢!"
End
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Set con = New ADODB.Connection
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=gzgl.mdb;Persist Security Info=False"
con.CursorLocation = adUseClient
con.Open
mysql = "select * from 管理"
Randomize
Text2.Text = ""
Label3.Caption = "版权所有:丁启永"
Set rs = con.Execute(mysql)
For j = 0 To rs.RecordCount - 1
Combo1.AddItem rs.Fields(j).Value
Next
Combo1.Text = rs.Fields(0)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set con = Nothing
Set rs = Nothing
End Sub
Private Sub Timer1_Timer()
a = Rnd * 255
b = Rnd * 255
c = Rnd * 255
welcome.Font = "隶书"
welcome.FontSize = "25"
welcome.ForeColor = RGB(a, b, c)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -