?? frmschoolinfo.frm
字號:
VERSION 5.00
Object = "{CE671F01-259E-40DA-92FE-95803E2ECBB5}#1.0#0"; "SmartXPButton.ocx"
Begin VB.Form FrmSchoolInfo
BackColor = &H00E7DFE7&
BorderStyle = 1 'Fixed Single
Caption = "學校信息設置"
ClientHeight = 2340
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
Icon = "FrmSchoolInfo.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2340
ScaleWidth = 4680
Begin VB.TextBox txtSchoolTel
Height = 375
Left = 1320
MaxLength = 12
TabIndex = 1
Top = 960
Width = 3135
End
Begin VB.TextBox txtSchoolName
Height = 375
Left = 1320
MaxLength = 12
TabIndex = 0
Top = 240
Width = 3135
End
Begin SmartXPButton.XpButton cmdSave
Height = 495
Left = 720
TabIndex = 2
Top = 1680
Width = 1335
_ExtentX = 2355
_ExtentY = 873
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "保存(&S)"
CaptionMouseOverColor= 16711680
PictureBackColor= 15790320
PictureSmoothBackColor= 15790320
ButtonPicture = "FrmSchoolInfo.frx":1CFA
End
Begin SmartXPButton.XpButton cmdExit
Cancel = -1 'True
Height = 495
Left = 2520
TabIndex = 3
Top = 1680
Width = 1335
_ExtentX = 2355
_ExtentY = 873
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "關閉(&E)"
CaptionMouseOverColor= 16711680
PictureBackColor= 15790320
PictureSmoothBackColor= 15790320
ButtonPicture = "FrmSchoolInfo.frx":2334
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "學校電話:"
Height = 180
Left = 240
TabIndex = 5
Top = 1080
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "學校簡稱:"
Height = 180
Left = 240
TabIndex = 4
Top = 360
Width = 900
End
End
Attribute VB_Name = "FrmSchoolInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Myschoolinfo As OpenRs
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Cmdsave_Click()
If txtSchoolName.Text = "" Then
txtSchoolName.SetFocus
MsgBox "請輸入學校簡稱!", vbOKOnly + vbInformation, "學校信息設置"
Exit Sub
End If
If txtSchoolTel.Text = "" Then
txtSchoolTel.SetFocus
MsgBox "請輸入學校電話!", vbOKOnly + vbInformation, "學校信息設置"
Exit Sub
End If
Myschoolinfo.rsDK1 "select * from school_info"
If Myschoolinfo.rs1.EOF Then
Myschoolinfo.rs1.AddNew
Myschoolinfo.rs1!school_name = txtSchoolName.Text
Myschoolinfo.rs1!school_tel = txtSchoolTel.Text
Myschoolinfo.rs1.Update
MsgBox "學校信息已保存!", vbOKOnly + vbInformation, "學校信息設置"
Else
Myschoolinfo.rs1!school_name = txtSchoolName.Text
Myschoolinfo.rs1!school_tel = txtSchoolTel.Text
Myschoolinfo.rs1.Update
MsgBox "學校信息已更新!", vbOKOnly + vbInformation, "學校信息設置"
End If
End Sub
Private Sub Form_Load()
Set Myschoolinfo = New OpenRs
Myschoolinfo.rsDK1 "select * from school_info"
If Myschoolinfo.rs1.EOF = False Then
txtSchoolName.Text = Myschoolinfo.rs1!school_name
txtSchoolTel.Text = Myschoolinfo.rs1!school_tel
End If
End Sub
Private Sub txtSchoolName_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Then KeyAscii = 0
End Sub
Private Sub txtSchoolTel_KeyPress(KeyAscii As Integer)
If Not (Chr(KeyAscii) <= "9" And Chr(KeyAscii) >= "0" Or KeyAscii = 45 Or KeyAscii = 8) Then
KeyAscii = 0
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -