📄 form1.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmlogin
Caption = "欢迎使用!"
ClientHeight = 3360
ClientLeft = 4590
ClientTop = 3570
ClientWidth = 5700
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 3360
ScaleWidth = 5700
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -240
Top = 0
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_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 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"
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 txtPassword
Height = 495
Left = 2520
TabIndex = 1
Top = 1440
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3240
TabIndex = 3
Top = 2400
Width = 1215
End
Begin VB.CommandButton sure
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1320
TabIndex = 2
Top = 2400
Width = 1215
End
Begin VB.TextBox txtUse
Height = 495
Left = 2520
TabIndex = 0
Top = 600
Width = 1575
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 = 3015
Left = 360
TabIndex = 5
Top = 120
Width = 5055
Begin VB.Label Label2
Caption = "用户密码"
Height = 615
Left = 960
TabIndex = 7
Top = 1440
Width = 1575
End
Begin VB.Label Label1
Caption = "用户ID号"
Height = 615
Left = 960
TabIndex = 6
Top = 720
Width = 1335
End
End
Begin VB.Label xiaoxi
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1320
TabIndex = 4
Top = 2880
Width = 3375
End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public constr As String
Private Sub Form_Load()
constr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"
frmmain.Show
frmmain.Enabled = False
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
sign.Show
End Sub
Private Sub sure_Click()
txtUseName = txtUse.Text
If txtUse.Text = "" Or txtPassword.Text = "" Then
MsgBox "ID或密码为空,请注意填写!", , "注意"
Else
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"
cn.Open
frmmain.Caption = frmmain.Caption + "[当前登录用户:" + txtUseName + "]"
Dim rs As ADODB.Recordset
Set rs = CallProcGetRecordset("sp_Login('" + txtUseName + "','" + frmlogin.txtPassword.Text + "')")
If rs!jg = 1 Then
Unload Me
Unload frmmain
xinxishucha.Show
frmmain.Enabled = True
Else
'xiaoxi.Caption = "无效密码,请重试!"
MsgBox "无效密码,请重试", , "登录"
txtPassword.SetFocus
End If
cn.Close
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -