📄 setinfo.frm
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form setinfo
BorderStyle = 3 'Fixed Dialog
Caption = "基本设置"
ClientHeight = 3240
ClientLeft = 5565
ClientTop = 2775
ClientWidth = 5715
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3240
ScaleWidth = 5715
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command3
Caption = "关闭(&C)"
Height = 375
Left = 4440
TabIndex = 6
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "应用(&A)"
Height = 375
Left = 3120
TabIndex = 5
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Height = 375
Left = 1800
TabIndex = 4
Top = 2760
Width = 1095
End
Begin TabDlg.SSTab SSTab1
Height = 2535
Left = 240
TabIndex = 0
Top = 120
Width = 5295
_ExtentX = 9340
_ExtentY = 4471
_Version = 393216
Tabs = 2
Tab = 1
TabsPerRow = 2
TabHeight = 520
TabCaption(0) = "最大借出书册设置"
TabPicture(0) = "setinfo.frx":0000
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "Label1"
Tab(0).Control(1)= "Label2"
Tab(0).Control(2)= "Text1"
Tab(0).ControlCount= 3
TabCaption(1) = "罚款设置"
TabPicture(1) = "setinfo.frx":001C
Tab(1).ControlEnabled= -1 'True
Tab(1).Control(0)= "Label3"
Tab(1).Control(0).Enabled= 0 'False
Tab(1).Control(1)= "Label4"
Tab(1).Control(1).Enabled= 0 'False
Tab(1).Control(2)= "Text2"
Tab(1).Control(2).Enabled= 0 'False
Tab(1).ControlCount= 3
Begin VB.TextBox Text2
BackColor = &H00C0FFFF&
BeginProperty DataFormat
Type = 1
Format = "#,##0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 8
Top = 960
Width = 975
End
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = -71880
TabIndex = 2
Top = 960
Width = 855
End
Begin VB.Label Label4
Caption = "元"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 4080
TabIndex = 9
Top = 1080
Width = 975
End
Begin VB.Label Label3
Caption = "超出一天罚款"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 1080
TabIndex = 7
Top = 1080
Width = 1695
End
Begin VB.Label Label2
Caption = "册"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = -70800
TabIndex = 3
Top = 1080
Width = 855
End
Begin VB.Label Label1
Caption = "每人最多借出册数"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = -74040
TabIndex = 1
Top = 1080
Width = 2055
End
End
End
Attribute VB_Name = "setinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "基本参数不能为空!", vbInformation + vbOKOnly, "警告"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "基本参数不能为空!", vbInformation + vbOKOnly, "警告"
Exit Sub
End If
Set g_rs = g_db.OpenRecordset(g_strsql)
g_rs.Edit
g_rs.Fields("借出册数").Value = Text1.Text
g_rs.Fields("罚款").Value = Text2.Text
g_rs.Update
Set g_rs = Nothing
MsgBox "设置完毕,请点确定键返回!", vbInformation + vbOKOnly, "信息"
Unload Me
End Sub
Private Sub Command2_Click()
If Text1.Text = "" Then
MsgBox "基本参数不能为空!", vbInformation + vbOKOnly, "警告"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "基本参数不能为空!", vbInformation + vbOKOnly, "警告"
Exit Sub
End If
Set g_rs = g_db.OpenRecordset(g_strsql)
g_rs.Edit
g_rs.Fields("借出册数").Value = Text1.Text
g_rs.Fields("罚款").Value = Text2.Text
g_rs.Update
Set g_rs = Nothing
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
dbl
g_strsql = "select * from setinfo"
Set g_rs = g_db.OpenRecordset(g_strsql)
Text1.Text = g_rs!借出册数
Text2.Text = g_rs!罚款
Text2.Text = Format$(Text2.Text, "0.00")
Set g_rs = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -