?? frmlessonedit.frm
字號:
VERSION 5.00
Begin VB.Form FrmLessonEdit
BorderStyle = 1 'Fixed Single
Caption = "編輯課程信息"
ClientHeight = 1830
ClientLeft = 45
ClientTop = 330
ClientWidth = 5280
Icon = "FrmLessonEdit.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1830
ScaleWidth = 5280
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 855
Left = 240
TabIndex = 3
Top = 120
Width = 4815
Begin VB.TextBox txtName
Height = 300
Left = 1200
MaxLength = 100
TabIndex = 0
Top = 300
Width = 3375
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "課程名稱"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 4
Top = 360
Width = 720
End
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 2848
MouseIcon = "FrmLessonEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 1200
Width = 1300
End
Begin VB.CommandButton Cmd_OK
Caption = "確 定"
Default = -1 'True
Height = 400
Left = 1133
MouseIcon = "FrmLessonEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 1200
Width = 1300
End
End
Attribute VB_Name = "FrmLessonEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean '插入=false,修改=true
Public OriId As Integer
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
'判斷是否輸入了課程名稱
If Len(Trim(txtName)) = 0 Then
MsgBox "請輸入課程名稱"
txtName.SetFocus
txtName.SelStart = 0
txtName.SelLength = Len(txtName)
Exit Sub
End If
'把用戶錄入的數據賦值到MyLesson對象的成員變量中
With MyLesson
.LessonName = MakeStr(txtName)
' .LessonType = Trim(ComboType.Text)
' .Teacher = MakeStr(txtTeacher)
' .Term = MakeStr(txtTerm)
' .Hours = Val(txtHours)
'根據變量Modify決定是插入新數據,還是更新已有的數據
If Modify = False Then
.Insert
Else
Call .Update(OriId)
End If
End With
MsgBox "編輯完成"
'關閉窗口
Unload Me
End Sub
Private Sub txtHours_KeyPress(KeyAscii As Integer)
If In_Int(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -