?? frmadvanced.frm
字號:
VERSION 5.00
Begin VB.Form frmAdvanced
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 4500
ClientLeft = 0
ClientTop = 0
ClientWidth = 4470
LinkTopic = "Form1"
Picture = "frmAdvanced.frx":0000
ScaleHeight = 4500
ScaleWidth = 4470
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
BackColor = &H00D8D7D5&
Caption = "添加刪除用戶"
Height = 3855
Left = 120
TabIndex = 0
Top = 480
Width = 4215
Begin VB.CommandButton Command2
Caption = "刪除"
Height = 495
Left = 2040
TabIndex = 6
Top = 2520
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 495
Left = 120
TabIndex = 5
Top = 2520
Width = 1455
End
Begin VB.TextBox txtPwd
Height = 495
Left = 1680
TabIndex = 4
Top = 1440
Width = 2175
End
Begin VB.TextBox txtName
Height = 495
Left = 1680
TabIndex = 3
Top = 720
Width = 2175
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 2
Top = 1560
Width = 1095
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用戶名:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 1
Top = 720
Width = 1215
End
End
Begin VB.Image Image1
Height = 345
Left = 4080
Picture = "frmAdvanced.frx":1DE5
Top = 0
Width = 345
End
End
Attribute VB_Name = "frmAdvanced"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim tmpUser, tmpPwd As String
Private Sub Text2_Change()
End Sub
Private Sub Command1_Click()
tmpUser = txtName.Text
tmpPwd = txtPwd.Text
mydb.opendb
SqlStmt = "INSERT INTO Users Values('" + Trim(tmpUser) + "','" _
+ Trim(tmpPwd) + "')"
b = mydb.exesql(SqlStmt, rs1, True)
mydb.closedb
If b Then
MsgBox "添加成功", 48, "提示"
txtName.Text = ""
txtPwd.Text = ""
txtName.SetFocus
Else
MsgBox "操作失敗", 48, "提示"
End If
End Sub
Private Sub Command2_Click()
If txtName.Text = "" Then
MsgBox "用戶名不能為空", 48, "提示"
End If
tmpUser = txtName.Text
If tmpUser = "admin" Then
MsgBox "不能刪除系統管理員", 48, "警告"
Exit Sub
Else
MyUser.delete (tmpUser)
MsgBox "刪除成功", 48, "提示"
txtName.Text = ""
txtName.SetFocus
End If
End Sub
Private Sub Image1_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -