📄 login.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form login
Caption = "登陆"
ClientHeight = 5295
ClientLeft = 360
ClientTop = 420
ClientWidth = 8010
LinkTopic = "Form1"
ScaleHeight = 5295
ScaleWidth = 8010
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 615
Left = 6240
Top = 4680
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 1085
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=YPGL"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=YPGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Frame Frame1
Caption = "登陆帐户"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2535
Left = 840
TabIndex = 1
Top = 1320
Width = 5175
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3360
TabIndex = 7
Top = 2040
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "登陆"
Default = -1 'True
Height = 375
Left = 1680
TabIndex = 6
Top = 2040
Width = 1215
End
Begin VB.TextBox Text2
Height = 615
Left = 1680
TabIndex = 5
Top = 1200
Width = 2775
End
Begin VB.TextBox Text1
Height = 615
Left = 1680
TabIndex = 4
Top = 480
Width = 2775
End
Begin VB.Label Label3
Caption = "密码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 3
Top = 1320
Width = 855
End
Begin VB.Label Label2
Caption = "帐户:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 2
Top = 600
Width = 855
End
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "医院药品进销存管理系统"
BeginProperty Font
Name = "黑体"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 600
TabIndex = 0
Top = 360
Width = 5940
End
End
Attribute VB_Name = "login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub command1_Click()
If Text1.Text = "" Then
MsgBox "Enter a Login ID:", vbCritical
Text1.SetFocus
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "Enter a Password:", vbCritical
Text2.SetFocus
Exit Sub
End If
Call openconn
sqlstr = "select * from users where loginid = '" & Text1.Text & "' and pass = '" & Text2.Text & "'"
Call rs(sqlstr)
If (adoRS.EOF) Then
MsgBox "Wrong Login ID or Password! Try Again", vbCritical
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Call closeconn
Exit Sub
End If
Call closeconn
userid = Text1.Text
Unload Me
MainForm.Show
End Sub
Private Sub command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -