📄 add.frm
字号:
VERSION 5.00
Begin VB.Form Add
BorderStyle = 3 'Fixed Dialog
Caption = "配置文件编辑器"
ClientHeight = 1935
ClientLeft = 3225
ClientTop = 2370
ClientWidth = 3375
ClipControls = 0 'False
Icon = "Add.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 1935
ScaleWidth = 3375
ShowInTaskbar = 0 'False
Begin VB.TextBox Newvalue
Height = 285
Left = 120
TabIndex = 3
Top = 960
Width = 3135
End
Begin VB.CommandButton Add
Caption = "增加(&A)"
Default = -1 'True
Height = 375
Left = 1200
TabIndex = 4
Top = 1440
Width = 975
End
Begin VB.CommandButton Cancel
Caption = "取消(&C)"
Height = 375
Left = 2280
TabIndex = 5
Top = 1440
Width = 975
End
Begin VB.TextBox Newtext
Height = 285
Left = 120
TabIndex = 1
Top = 360
Width = 3135
End
Begin VB.Label Newvaluelabel
Caption = "值:"
Height = 255
Left = 120
TabIndex = 2
Top = 720
Width = 495
End
Begin VB.Label Addnewlabel
Caption = "增加新类型:"
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 1335
End
End
Attribute VB_Name = "Add"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Add_Click()
If Addnewlabel.Caption = "增加新类型:" Then 'if adding a new section
WritePrivateProfileStringByKeyName Newtext.Text, "", "", Ini.Filename.Text
ElseIf Addnewlabel.Caption = "增加新条目:" Then 'if adding a new entry
WritePrivateProfileStringByKeyName Ini.Sectionslist.Text, Newtext.Text, Newvalue.Text, Ini.Filename.Text
ElseIf Addnewlabel.Caption = "编辑条目:" Then 'if editing an entry then
WritePrivateProfileStringByKeyName Ini.Sectionslist.Text, Newtext.Text, Newvalue.Text, Ini.Filename.Text
End If
'This code changes the filename text box so that the new edits that have
'been made can be updated in the program options.
'The "Ini.filename_change" procedure will not work here so this code is
'used instead.
Ini.Filename.Text = ""
Ini.Filename.Text = Ini.Filename.Text
Unload Me 'exit the add dialog
End Sub
Private Sub Cancel_Click()
Unload Me 'exit the add dialog
End Sub
Private Sub Form_Load()
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2 'centre the form on the screen
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -