📄 madduser.frm
字号:
VERSION 5.00
Begin VB.Form madduser
BorderStyle = 3 'Fixed Dialog
Caption = "添加用户"
ClientHeight = 3660
ClientLeft = 45
ClientTop = 330
ClientWidth = 6720
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "madduser.frx":0000
ScaleHeight = 3660
ScaleWidth = 6720
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdOkCancel
Caption = "添加"
Default = -1 'True
Height = 375
Index = 0
Left = 3720
Picture = "madduser.frx":9C09
Style = 1 'Graphical
TabIndex = 8
Top = 3000
Width = 975
End
Begin VB.CommandButton cmdOkCancel
Cancel = -1 'True
Caption = "取消"
Height = 375
Index = 1
Left = 5040
Picture = "madduser.frx":C469
Style = 1 'Graphical
TabIndex = 7
Top = 3000
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 0
Left = 1320
TabIndex = 6
Text = "Text1"
Top = 720
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 1
Left = 3120
TabIndex = 5
Text = "Text1"
Top = 720
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 2
Left = 5040
TabIndex = 4
Text = "Text1"
Top = 720
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 3
Left = 1320
TabIndex = 3
Text = "Text1"
Top = 1440
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 4
Left = 3240
TabIndex = 2
Text = "Text1"
Top = 1440
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 5
Left = 5040
TabIndex = 1
Text = "Text1"
Top = 1560
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 6
Left = 1320
TabIndex = 0
Text = "Text1"
Top = 2160
Width = 975
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "罚金"
Height = 180
Index = 5
Left = 4440
TabIndex = 16
Top = 1560
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "班级"
Height = 180
Index = 4
Left = 2640
TabIndex = 15
Top = 1560
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "所在系别"
Height = 180
Index = 3
Left = 360
TabIndex = 14
Top = 1560
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码"
Height = 180
Index = 2
Left = 4440
TabIndex = 13
Top = 720
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名"
Height = 180
Index = 1
Left = 2640
TabIndex = 12
Top = 720
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "借书证号"
Height = 180
Index = 0
Left = 360
TabIndex = 11
Top = 720
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "身份"
Height = 180
Index = 6
Left = 600
TabIndex = 10
Top = 2280
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(1--表示管理,0--表示普通用户)"
Height = 180
Index = 7
Left = 2520
TabIndex = 9
Top = 2160
Width = 2880
End
End
Attribute VB_Name = "madduser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdOkCancel_Click(Index As Integer)
Select Case Index
Case 0
editusername = Trim(Text1(0).Text)
editname = Trim(Text1(1).Text)
editpassword = Trim(Text1(2).Text)
editsubject = Trim(Text1(3).Text)
editclass = Trim(Text1(4).Text)
editmoney = Val(Trim(Text1(5).Text))
editlevel = Trim(Text1(6).Text)
If editlevel <> "1" And editlevel <> "0" Then
editlevel = "0"
End If
If editusername = "" Or editname = "" Or editpassword = "" Or editsubject = "" Or editclass = "" Or editlevel = "" Then
MsgBox "您是不是还有一项没填,要填好才能正确保存!", 64, "提示"
Text1(0).SetFocus
Exit Sub
ElseIf (VarType(editmoney) <> 5) Then
MsgBox "罚金项必需填数字才能正确保存!", 64, "提示"
Text1(0).SetFocus
Exit Sub
Else
mSave = True
Unload Me
End If
Case 1
mSave = False
Unload Me
End Select
End Sub
Private Sub Form_Activate()
Text1(0).SetFocus
End Sub
Private Sub Form_Load()
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Text1(3).Text = ""
Text1(4).Text = ""
Text1(5).Text = ""
Text1(6).Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -