📄 frmuser.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.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 frmuser
Appearance = 0 'Flat
BackColor = &H0080FF80&
BorderStyle = 0 'None
Caption = "神龙科技(网吧库管)"
ClientHeight = 4845
ClientLeft = 0
ClientTop = 0
ClientWidth = 5940
LinkTopic = "Form1"
ScaleHeight = 4845
ScaleWidth = 5940
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 630
Top = 4305
Visible = 0 'False
Width = 2010
_ExtentX = 3545
_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 工程1.xpcmdbutton xpcmdbutton2
Height = 465
Left = 4440
TabIndex = 11
Top = 3780
Width = 870
_ExtentX = 1535
_ExtentY = 820
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 = 405
Left = 3360
TabIndex = 10
Top = 3780
Width = 885
_ExtentX = 1561
_ExtentY = 714
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 Text4
Height = 270
IMEMode = 3 'DISABLE
Left = 4005
PasswordChar = "*"
TabIndex = 9
Top = 2775
Width = 1500
End
Begin VB.TextBox Text3
Height = 270
IMEMode = 3 'DISABLE
Left = 4020
PasswordChar = "*"
TabIndex = 7
Top = 2280
Width = 1500
End
Begin VB.TextBox Text2
Height = 330
Left = 4005
TabIndex = 5
Top = 1785
Width = 1515
End
Begin VB.TextBox Text1
Height = 270
Left = 4020
TabIndex = 3
Top = 1350
Width = 1245
End
Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSH1
Height = 2895
Left = 345
TabIndex = 1
Top = 1275
Width = 2715
_ExtentX = 4789
_ExtentY = 5106
_Version = 393216
FixedCols = 0
BackColorFixed = 14737632
BackColorBkg = -2147483634
Appearance = 0
_NumberOfBands = 1
_Band(0).Cols = 2
End
Begin CoolBoySkinForVB6.CoolBoySkin CoolBoySkin1
Height = 1845
Left = 690
TabIndex = 12
Top = 2415
Width = 3405
_ExtentX = 6006
_ExtentY = 3254
Caption = "神龙科技(网吧库管)"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MenuBackColor = 16777215
End
Begin VB.Shape Shape1
Height = 4125
Left = 240
Top = 510
Width = 5415
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "再输一次:"
Height = 285
Left = 3105
TabIndex = 8
Top = 2805
Width = 930
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "密码:"
Height = 285
Left = 3390
TabIndex = 6
Top = 2340
Width = 540
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "姓名:"
Height = 300
Left = 3390
TabIndex = 4
Top = 1860
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "用户ID:"
Height = 360
Left = 3210
TabIndex = 2
Top = 1395
Width = 945
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "用户登记"
BeginProperty Font
Name = "楷体_GB2312"
Size = 21.75
Charset = 134
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 285
TabIndex = 0
Top = 735
Width = 5325
End
End
Attribute VB_Name = "frmuser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim oldx As Long
Dim oldy As Long
Dim mov As Boolean
Private Sub Form_Terminate()
tim = 0
If username = "" Then loginfrm.Show
End Sub
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
tim = 0
oldx = X
oldy = Y
mov = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
tim = 0
If mov Then
Me.Move Me.Left + (X - oldx), Me.Top + (Y - oldy)
End If
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mov = False
End Sub
Private Sub Form_Load()
tim = 0
Me.Left = Screen.Width - Me.Width
Me.Top = 400
Adodc1.ConnectionString = connstr
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select userid as 用户编号,username as 用户姓名 from [user] WHERE DWS='" & gsname & "'"
Adodc1.Refresh
Set MSH1.DataSource = Adodc1
End Sub
Private Sub Label3_Click()
If KeyAscii = 13 Then Text4.SetFocus
End Sub
Private Sub MSH1_Click()
tim = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
tim = 0
If KeyAscii = 13 Then Text2.SetFocus
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
tim = 0
If KeyAscii = 13 Then Text3.SetFocus
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
tim = 0
If KeyAscii = 13 Then Text4.SetFocus
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
tim = 0
If KeyAscii = 13 Then Call xpcmdbutton1_Click
End Sub
Private Sub xpcmdbutton1_Click()
If Trim(Text1) = "" Then Exit Sub
If Text2 = "" Then Exit Sub
If Trim(Text3) <> Trim(Text4) Then
MsgBox "两次密码不同!", vbOKOnly + vbCritical, "错误"
Text4.SetFocus
Exit Sub
End If
If rs.State Then rs.Close
rs.Open "select * from [user] where userid='" & Trim(Text1) & "' and DWS='" & gsname & "'", cn, 3, 3
If Not rs.EOF Then
MsgBox "用户编号重复!", vbOKOnly + vbCritical, "错误"
Text1.SetFocus
Exit Sub
Else
rs.addnew
rs.Fields("userid") = Trim(Text1.Text)
rs.Fields("username") = Trim(Text2.Text)
rs.Fields("userpassword") = Trim(Text3.Text)
rs.Fields("dws") = gsname
rs.Update
End If
If rs.State Then rs.Close
Adodc1.RecordSource = "select userid as 用户编号,username as 用户姓名 from [user] WHERE DWS='" & gsname & "'"
Adodc1.Refresh
Set MSH1.DataSource = Adodc1
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
End Sub
Private Sub xpcmdbutton2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -