📄 form4.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Begin VB.Form Form4
BorderStyle = 0 'None
Caption = "Form4"
ClientHeight = 7245
ClientLeft = 0
ClientTop = 0
ClientWidth = 12000
LinkTopic = "Form4"
MDIChild = -1 'True
ScaleHeight = 7245
ScaleWidth = 12000
ShowInTaskbar = 0 'False
Begin MSComDlg.CommonDialog CommonDialog1
Left = 9480
Top = 600
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 2880
Top = 7440
Width = 5895
_ExtentX = 10398
_ExtentY = 873
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.Frame Frame11
BackColor = &H8000000D&
BorderStyle = 0 'None
Caption = "Frame11"
Height = 2535
Left = 0
TabIndex = 5
Top = 4080
Visible = 0 'False
Width = 2655
Begin CSCommand.Command Command2
Height = 255
Left = 1800
TabIndex = 11
Top = 1680
Width = 735
_ExtentX = 1296
_ExtentY = 450
IconAlign = 0
Icon = "Form4.frx":0000
Caption = "取消"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command Command1
Height = 255
Left = 840
TabIndex = 10
Top = 1680
Width = 735
_ExtentX = 1296
_ExtentY = 450
IconAlign = 0
Icon = "Form4.frx":001C
Caption = "确定"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.TextBox Text8
Appearance = 0 'Flat
Height = 270
IMEMode = 3 'DISABLE
Left = 840
PasswordChar = "*"
TabIndex = 7
Top = 1080
Width = 1695
End
Begin VB.TextBox Text6
Appearance = 0 'Flat
Height = 270
Left = 840
TabIndex = 6
Top = 600
Width = 1695
End
Begin VB.Label Label38
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码:"
ForeColor = &H8000000E&
Height = 180
Left = 240
TabIndex = 9
Top = 1080
Width = 540
End
Begin VB.Label Label37
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户:"
ForeColor = &H8000000E&
Height = 180
Left = 240
TabIndex = 8
Top = 720
Width = 540
End
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "::::::文件导入::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 210
Left = 240
TabIndex = 4
Top = 480
Width = 2100
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "::::::文件导出::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 210
Left = 240
TabIndex = 3
Top = 840
Width = 2100
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "::::::打印报表::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 210
Left = 240
TabIndex = 2
Top = 1200
Width = 2100
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "::::::退 出::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 210
Left = 240
TabIndex = 1
Top = 1920
Width = 2100
End
Begin VB.Label Label36
BackStyle = 0 'Transparent
Caption = "::::::重新登录::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 255
Left = 240
TabIndex = 0
Top = 1560
Width = 2295
End
Begin VB.Image Image1
Height = 7260
Left = 0
Picture = "Form4.frx":0038
Top = 0
Width = 12000
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Trim(Text6.Text) = Trim(Form2.yh) Then
MsgBox "当前用户正在使用,请用其他用户名登录!!"
Text6.Text = ""
Text8.Text = ""
Exit Sub
Text6.SetFocus
Else
Adodc1.RecordSource = "SELECT * FROM 用户表 "
Adodc1.Refresh
'Dim StrUser As String
'Dim StrPassWord As String
'Dim StrYfc As String
'Adodc1.Visible = False
'StrUser = Adodc1.Recordset.Field("用户名")
'StrPassWord = Adodc1.Recordset.Fields("用户密码")
'StrYfc = Adodc1.Recordset.Fields("权限")
If Text6.Text = "" Then
MsgBox "请输入用户名!", vbOKOnly + 16, "电脑公司管理系统"
Exit Sub
End If
'If Not Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveFirst
'End If
Do While Not Adodc1.Recordset.EOF
If Trim(Text6.Text) <> Trim(Adodc1.Recordset.Fields("用户名")) Then
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
MsgBox "当前户名不存在或密码错误!", vbOKOnly + 16, "电脑公司管理系统"
Text6.Text = ""
Text8.Text = ""
Exit Sub
End If
' StrUser = Adodc1.Recordset.Fields("用户名")
'StrPassWord = Adodc1.Recordset.Fields("用户密码")
' StrYfc = Adodc1.Recordset.Fields("权限")
Else
If Trim(Text8.Text) <> Trim(Adodc1.Recordset.Fields("用户密码")) Then
MsgBox "用户名或密码错误!", vbOKOnly + 16, "电脑公司管理系统"
Text6.Text = ""
Text8.Text = ""
Text6.SetFocus
Exit Sub
End If
If Trim(Text8.Text) = Trim(Adodc1.Recordset.Fields("用户密码")) Then
Form2.qx = Trim(Adodc1.Recordset.Fields("权限"))
Form2.yh = Trim(Text6.Text) 'Trim(Adodc1.Recordset.Fields("用户名"))
'Unload Me
Unload MDIForm1
Text6.Text = ""
Text8.Text = ""
MDIForm1.Show
MsgBox "切换用户成功!!"
Exit Sub
End If
End If
Loop
'MDIForm1.Show
'Form2.Hide
'Unload Me
End If
End Sub
Private Sub Command2_Click()
Text6.Text = ""
Text8.Text = ""
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=管理系统"
Form4.Top = 0
Form4.Left = 0
Form4.Width = Me.Width
Form4.Height = Me.Height
Frame11.Left = 0
Frame11.Height = 3295
Frame11.Top = 3960
Frame11.Width = 3015
End Sub
'Private Sub Label10_Click()
'Dim fso As New FileSystemObject
'Dim filename As File, sPath, Fname As String
'On Error GoTo fd
'Fname = App.Path
'If Right(Fname, 1) <> "\" Then Fname = Fname + "\"
'Fname = Fname + "data\kji.bgh"
'Set filename = fso.GetFile(Fname)
'Me.CommonDialog1.ShowSave
'Me.CommonDialog1.Filter = "data (*.mdf)|*.mdf"
'sPath = Me.CommonDialog1.filename
'filename.Copy sPath
'MsgBox "数据文件已导出!", vbOKOnly + 48, "公司管理系统"
'fd:
'Exit Sub
'End Sub
Private Sub Label13_Click()
End
End Sub
Private Sub Label36_Click()
Frame11.Visible = True
End Sub
'Private Sub Label9_Click()
'Dim fso As New FileSystemObject
'Dim filename As File, sPath, Fname As String
'On Error GoTo ddd
'Me.CommonDialog1.ShowOpen
'Me.CommonDialog1.Filter = "data (*.mdf)|*.mdf"
'sPath = Me.CommonDialog1.filename
'Set filename = fso.GetFile(sPath)
'Fname = App.Path
'If Right(Fname, 1) <> "\" Then Fname = Fname + "\"
' Fname = Fname + "data\kji.bgh"
'filename.Copy Fname
'MsgBox "数据文件已导入!", vbOKOnly + 48, "公司管理系统"
'
'ddd:
'Exit Sub
'End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -