📄 login.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{15F8A61A-A8F0-11D2-8350-DA7378C7D4D3}#1.1#0"; "TRAYFORM.OCX"
Object = "{D07CD9D2-ECE9-493F-86F2-186659945889}#1.0#0"; "Xpbutton.ocx"
Object = "{625E61B9-D59C-4612-89FC-D10614DC5873}#1.0#0"; "CoolBoySkin1.2(修正版).ocx"
Begin VB.Form loginfrm
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
BorderStyle = 3 'Fixed Dialog
Caption = "登录窗口"
ClientHeight = 2895
ClientLeft = 8910
ClientTop = 3240
ClientWidth = 3630
ClipControls = 0 'False
DrawMode = 8 'Xor Pen
FillStyle = 0 'Solid
Icon = "login.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "login.frx":0C62
ScaleHeight = 2895
ScaleWidth = 3630
ShowInTaskbar = 0 'False
Begin VB.TextBox Text1
Height = 285
Left = 1035
TabIndex = 5
Top = 1185
Width = 1890
End
Begin VB.TextBox Text2
Height = 285
IMEMode = 3 'DISABLE
Left = 1020
PasswordChar = "*"
TabIndex = 4
Text = "Text2"
Top = 1530
Width = 1905
End
Begin VB.Timer Timer1
Interval = 1000
Left = 1095
Top = 1800
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1035
TabIndex = 1
Top = 1890
Width = 1920
End
Begin CoolBoySkinForVB6.CoolBoySkin CoolBoySkin1
Height = 1845
Left = 120
TabIndex = 0
Top = 405
Width = 3405
_ExtentX = 6006
_ExtentY = 3254
Caption = "登录窗口"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "新宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MenuBackColor = 16777215
End
Begin 工程1.xpcmdbutton xpcmdbutton2
Height = 510
Left = 2055
TabIndex = 2
Top = 2295
Width = 930
_ExtentX = 1640
_ExtentY = 900
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 工程1.xpcmdbutton xpcmdbutton1
Height = 510
Left = 825
TabIndex = 3
Top = 2295
Width = 900
_ExtentX = 1588
_ExtentY = 900
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 MSAdodcLib.Adodc Adodc1
Height = 330
Left = 5175
Top = 2280
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 TrayFormControl.TrayForm TrayForm1
Left = 1260
Top = -15
_ExtentX = 2064
_ExtentY = 794
TrayButton = 0 'False
MinimizeToTray = -1 'True
Icon = "login.frx":1F87A
ToolTip = "仓库商品登记"
MenuCaption = ""
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户登录"
BeginProperty Font
Name = "楷体_GB2312"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 465
Left = 780
TabIndex = 9
Top = 540
Width = 1980
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "用户ID:"
Height = 375
Left = 300
TabIndex = 8
Top = 1185
Width = 810
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "密 码:"
Height = 375
Left = 315
TabIndex = 7
Top = 1560
Width = 765
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "部门:"
Height = 285
Left = 495
TabIndex = 6
Top = 1935
Width = 555
End
Begin VB.Image Image1
Height = 2985
Left = -135
Picture = "login.frx":1FA54
Stretch = -1 'True
Top = 150
Width = 3900
End
Begin VB.Menu menu
Caption = "menu"
Visible = 0 'False
Begin VB.Menu login
Caption = "重新登录"
End
Begin VB.Menu rkdj
Caption = "入库登记"
End
Begin VB.Menu ckdj
Caption = "领用登记"
End
Begin VB.Menu kcxx
Caption = "库存信息"
End
Begin VB.Menu addnew
Caption = "新增商品"
End
Begin VB.Menu adduser
Caption = "新增用户"
End
Begin VB.Menu meukcsetup
Caption = "报警设置"
End
Begin VB.Menu mnupass
Caption = "修改密码"
End
Begin VB.Menu jbdj
Caption = "交班登记"
End
Begin VB.Menu mnuxt
Caption = "系统管理"
End
Begin VB.Menu exit
Caption = "退出程序"
End
End
End
Attribute VB_Name = "loginfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub addnew_Click()
spdj.Show
End Sub
Private Sub adduser_Click()
frmuser.Show
End Sub
Private Sub ckdj_Click()
Frmck.Show
End Sub
Private Sub Form_Activate()
On Error Resume Next
Unload cktk
Unload frmbb
Unload Frmck
Unload Frmrk
Unload frmuser
Unload frmzdkc
Unload pass
Unload rkth
Unload rkwh
Unload spdj
Unload jbdjs
Unload spxx
Text1.SetFocus
End Sub
Private Sub Form_Load()
On Error Resume Next
Me.Width = 3870
Me.Height = 3285
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = Screen.Height * 1 / 3
CoolBoySkin1.SetFormActiveStyle True
TrayForm1.MinimizeToTray = True
TrayForm1.TrayButton = False
TrayForm1.SendToTray
Set TrayForm1.menu = Me.menu
TrayForm1.AddToMenu = True
Text1 = ""
Text2 = ""
Adodc1.ConnectionString = connstr
Adodc1.CommandType = adCmdText
Adodc1.CommandTimeout = 20
Combo1.Clear
Combo1.AddItem "神龙网吧"
Combo1.AddItem "风云网吧"
Combo1.Text = GetSetting(App.Title, "setting", "gsname", "")
Me.mnuxt.Visible = False
Me.Show
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
Unload cktk
Unload frmbb
Unload Frmck
Unload Frmrk
Unload frmuser
Unload frmzdkc
Unload pass
Unload rkth
Unload rkwh
Unload spdj
Unload spxx
Unload jkws
Me.mnuxt.Visible = False
End Sub
Private Sub Form_Resize()
On Error Resume Next
If Me.WindowState = 1 Then Me.WindowState = 0
Me.Width = 3870
Me.Height = 3270
End Sub
Private Sub Form_Unload(Cancel As Integer)
tim = 0
End Sub
Private Sub jbdj_Click()
jbdjs.Show
End Sub
Private Sub kcxx_Click()
spxx.Show
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub login_Click()
Call Form_Load
loginfrm.Show
End Sub
Private Sub meukcsetup_Click()
frmzdkc.Show
End Sub
Private Sub mnupass_Click()
pass.Show
End Sub
Private Sub mnuxt_Click()
frmbb.Show
End Sub
Private Sub rkdj_Click()
Frmrk.Show
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text2.SetFocus
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Call xpcmdbutton1_Click
End Sub
Private Sub Timer1_Timer()
tim = tim + 1
If tim = 300 Then username = ""
TrayForm1.ToolTip = " 用户:" & username & " " & Now
End Sub
Private Sub xpcmdbutton1_Click()
If Trim(Text1.Text) = "" Then Exit Sub
Adodc1.RecordSource = "select * from [user] where userid='" & Trim(Text1.Text) & "' and DWS='" & Trim(Combo1.Text) & "'"
Adodc1.Refresh
With Adodc1.Recordset
If .EOF Then
MsgBox "用户名错误!", vbOKOnly + vbExclamation, "神龙网吧仓库工具"
Text1.SetFocus
Exit Sub
Else
If .Fields("userpassword") <> Trim(Text2.Text) Then
MsgBox "密码错误!", vbOKOnly + vbExclamation, "神龙网吧仓库工具"
Text2.SetFocus
Exit Sub
End If
Set TrayForm1.menu = Me.menu
TrayForm1.AddToMenu = True
TrayForm1.SendToTray
username = Trim(.Fields("username"))
userid = Trim(Text1)
password = Trim(Text2)
gsname = Trim(Combo1.Text)
jczdkc
Me.Hide
Text1.Text = ""
Text2.Text = ""
SaveSetting App.Title, "setting", "gsname", Trim(Combo1.Text)
Load mme
mme.Show
End If
End With
End Sub
Private Sub xpcmdbutton2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -