?? frmlogin.frm
字號:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmUserEdit
BorderStyle = 3 'Fixed Dialog
Caption = "修改用戶屬性"
ClientHeight = 2955
ClientLeft = 2835
ClientTop = 3480
ClientWidth = 4740
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1745.912
ScaleMode = 0 'User
ScaleWidth = 4450.604
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 375
Left = 600
TabIndex = 11
Top = 1440
Width = 3495
Begin VB.OptionButton Option2
Caption = "科目管理員"
Height = 180
Left = 1800
TabIndex = 5
Top = 120
Width = 1575
End
Begin VB.OptionButton Option1
Caption = "系統管理員"
Height = 180
Left = 240
TabIndex = 4
Top = 120
Value = -1 'True
Width = 1335
End
End
Begin VB.TextBox New_Name
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
MaxLength = 14
TabIndex = 1
Top = 120
Width = 2535
End
Begin VB.TextBox New1_Pwd
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 1680
MaxLength = 9
PasswordChar = "*"
TabIndex = 2
ToolTipText = "請輸入您的新密碼"
Top = 600
Width = 2535
End
Begin VB.TextBox New2_Pwd
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 1680
MaxLength = 9
PasswordChar = "*"
TabIndex = 3
ToolTipText = "請再輸入一次您的新密碼!"
Top = 1080
Width = 2535
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "frmLogin.frx":0000
Height = 330
Left = 1680
TabIndex = 6
Top = 1920
Width = 2535
_ExtentX = 4471
_ExtentY = 582
_Version = 393216
IntegralHeight = 0 'False
Enabled = 0 'False
ListField = "ClassName"
BoundColumn = "ClassName"
Text = "請選擇科目"
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 0
Top = 2160
Visible = 0 'False
Width = 2880
_ExtentX = 5080
_ExtentY = 661
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=TikuSys"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "TikuSys"
OtherAttributes = ""
UserName = ""
Password = "8263958"
RecordSource = "SELECT ClassName FROM Classes WHERE UpperId=0"
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.CommandButton Cmd_OK
Caption = "確 定"
Default = -1 'True
Height = 390
Left = 720
TabIndex = 0
Top = 2400
Width = 1140
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 390
Left = 2520
TabIndex = 7
Top = 2400
Width = 1140
End
Begin VB.Label Label5
Caption = "用 戶 名:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 10
Top = 240
Width = 1095
End
Begin VB.Label Label2
Caption = "輸入新密碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 9
Top = 720
Width = 1335
End
Begin VB.Label Label3
Caption = "確認新密碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 8
Top = 1200
Width = 1215
End
End
Attribute VB_Name = "frmUserEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public UserClass As String
Public Modify As Boolean
'Modify=False 時,表示修改用戶屬性
'Modify=True 時,表示添加用戶屬性
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_Ok_Click()
If New_Name = "" Or New1_Pwd = "" Or New2_Pwd = "" Then
MsgBox "各項均不能為空 !", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Len(New1_Pwd.Text) < 6 Then
MsgBox "為了安全,密碼的位數不得小于 6 位 !", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If New1_Pwd.Text <> New2_Pwd.Text Then
MsgBox "您兩次輸入的新密碼不同," & Chr(13) & Chr(10) _
& " 請重新輸入您的新密碼 !", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If DataCombo1.Enabled = True Then
If DataCombo1.Text = "" Then
MsgBox "請選擇此用戶所管理的科目!", vbOKOnly + 48, "警告"
DataCombo1.SetFocus
Exit Sub
Else
If MyClass.In_DB(DataCombo1.Text) = False Then
MsgBox "此課程不存在,請重新選擇科目!", vbOKOnly + 48, "警告"
DataCombo1.SetFocus
Exit Sub
End If
End If
End If
If Option1.Value = True Then
CurUser.UserType = 0
Else
UserClass = DataCombo1.Text
MyClass.GetInfo (UserClass)
CurUser.UserType = MyClass.ClassId
End If
If Modify = False Then
i = MsgBox("請記住您的新密碼 !", vbOKCancel + vbQuestion, "確認?")
If i = 1 Then
CurUser.UserName = New_Name.Text
CurUser.Pwd = Trim(New1_Pwd.Text)
MyUser.Update (CurUser.UserName)
Unload Me
End If
Else
If MyUser.In_DB(Trim(New_Name.Text)) = True Then
MsgBox "此用戶名已經存在,請重新輸入用戶名!", vbOKOnly + 48, "警告"
Exit Sub
End If
'開始添加
CurUser.UserName = New_Name.Text
CurUser.Pwd = Trim(New1_Pwd.Text)
CurUser.Insert
Unload Me
End If
End Sub
Private Sub Option1_Click()
DataCombo1.Enabled = False
CurUser.UserType = 0
End Sub
Private Sub Option2_Click()
DataCombo1.Enabled = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -