?? frmlogin.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmlogin
BackColor = &H00004000&
BorderStyle = 1 'Fixed Single
Caption = "醫院信息管理系統用戶登錄"
ClientHeight = 1650
ClientLeft = 45
ClientTop = 330
ClientWidth = 4110
FillColor = &H00404040&
ForeColor = &H00404040&
Icon = "frmlogin.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmlogin.frx":030A
ScaleHeight = 1650
ScaleWidth = 4110
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2760
Top = 0
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
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 = ""
OLEDBString = ""
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.TextBox Text1
BackColor = &H00FFFFFF&
ForeColor = &H000000FF&
Height = 270
Left = 1185
MaxLength = 20
TabIndex = 0
Top = 250
Width = 2400
End
Begin VB.TextBox Text2
BackColor = &H00FFFFFF&
ForeColor = &H000000FF&
Height = 270
IMEMode = 3 'DISABLE
Left = 1185
MaxLength = 20
PasswordChar = "*"
TabIndex = 1
Top = 650
Width = 2400
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 320
Left = 945
TabIndex = 2
Top = 1150
Width = 800
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 320
Left = 2505
TabIndex = 3
Top = 1150
Width = 800
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00004000&
BackStyle = 0 'Transparent
Caption = "用戶名"
ForeColor = &H00000000&
Height = 180
Left = 480
TabIndex = 5
Top = 310
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00004000&
BackStyle = 0 'Transparent
Caption = "密 碼"
ForeColor = &H00000000&
Height = 180
Left = 480
TabIndex = 4
Top = 710
Width = 540
End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public userdwname As String
Public username As String
Public userright As String
Public conn As String
Private Sub Command1_Click()
Dim password As String
Dim respond As String
username = Text1.Text
password = Text2.Text
On Error GoTo err1
Adodc1.ConnectionString = conn
Adodc1.RecordSource = "select * from usertab where 用戶名=" & "'" & username & "'" & " and " & "密碼=" & "'" & password & "'"
Adodc1.Refresh
If Adodc1.Recordset.AbsolutePosition = adPosUnknown Then
respond = MsgBox("用戶名或密碼錯誤,請重新輸入!", vbOKOnly, "警告")
If respond <> vbOKOnly Then
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
username = ""
password = ""
End If
Else
userright = Adodc1.Recordset.Fields("權限")
Unload frmlogin
frmmain.Show
End If
Exit Sub
err1:
MsgBox "系統配置錯誤!無法與服務器連接!"
userright = "0"
Unload Me
frmsysset.Show
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
'conn = Frmstart.pconn
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\his.mdb;Persist Security Info=False"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -