📄 frmkm1.frm
字号:
VERSION 5.00
Object = "{90F3D7B3-92E7-44BA-B444-6A8E2A3BC375}#1.0#0"; "actskin4.ocx"
Begin VB.Form FRMKM1
BorderStyle = 3 'Fixed Dialog
Caption = "科目添加页"
ClientHeight = 1845
ClientLeft = 45
ClientTop = 330
ClientWidth = 3945
Icon = "FRMKM1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1845
ScaleWidth = 3945
StartUpPosition = 2 '屏幕中心
Begin ACTIVESKINLibCtl.Skin Skin1
Left = 3030
OleObjectBlob = "FRMKM1.frx":030A
Top = 450
End
Begin VB.CommandButton Command1
Caption = "确定输入"
Height = 465
Left = 2640
TabIndex = 4
Top = 960
Width = 1095
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 405
Left = 1050
TabIndex = 1
Top = 1290
Width = 1425
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 405
Left = 1050
TabIndex = 0
Top = 720
Width = 1425
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 255
Index = 0
Left = 240
OleObjectBlob = "FRMKM1.frx":2A49B
TabIndex = 2
Top = 780
Width = 735
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 315
Index = 1
Left = 240
OleObjectBlob = "FRMKM1.frx":2A4F6
TabIndex = 3
Top = 1350
Width = 735
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel4
Height = 435
Left = 90
OleObjectBlob = "FRMKM1.frx":2A551
TabIndex = 5
Top = 120
Width = 3795
End
End
Attribute VB_Name = "FRMKM1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim rs As Recordset
Dim STR As String
Private Sub Command1_Click()
On Error Resume Next
If Val(Text2.Text) > 500 Or Val(Text2.Text) = 0 Or Text2.Text = "" Or Text1.Text = "" Then
Text1.Text = ""
Text2.Text = ""
MsgBox "您输入的卷面分有误", 32, "拒绝录入"
Exit Sub
Else
Set db = OpenDatabase(App.Path & "\SET.PAS")
STR = "INSERT INTO 科目 (科目,卷面满分) VALUES ('" & Text1.Text & "','" & Text2.Text & "')"
db.Execute STR
db.Close
Unload Me
End If
End Sub
Private Sub Form_Load()
On Error Resume Next
Text1.Text = ""
Text2.Text = ""
' Skin1.LoadSkin App.Path & "\SKIN\9.sk"
Skin1.ApplySkin Me.hwnd
prevWndProc = GetWindowLong(Text2.hwnd, GWL_WNDPROC)
SetWindowLong Text2.hwnd, GWL_WNDPROC, AddressOf WndProc
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
FRMSETKM.Enabled = True
Dim ws As Workspace
Dim db As Database
Dim rs As Recordset
For Each ws In Workspaces
For Each db In ws.Databases
For Each rs In db.Recordsets
rs.Close
Set rs = Nothing
Next
db.Close
Set db = Nothing
Next
ws.Close
Set ws = Nothing
Next
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii >= 48 And KeyAscii <= 57 Then
KeyAscii = 0 '取消字符。
Beep '发出错误信号。
End If
If KeyAscii >= 96 And KeyAscii <= 111 Then
KeyAscii = 0 '取消字符。
Beep '发出错误信号。
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
On Error Resume Next
Select Case KeyAscii
Case 48 To 57, 8
Case 46
If InStr(Text2.Text, ".") <> 0 Then
KeyAscii = 0
End If
Case Else
KeyAscii = 0
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -