📄 faddtag.frm
字号:
VERSION 5.00
Begin VB.Form fAddTag
Caption = "增加标签"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 2400
TabIndex = 8
Top = 2640
Width = 855
End
Begin VB.CommandButton Command1
Caption = "增加"
Default = -1 'True
Height = 375
Left = 1440
TabIndex = 7
Top = 2640
Width = 855
End
Begin VB.Frame Frame1
Caption = "标签信息"
Height = 2415
Left = 120
TabIndex = 0
Top = 120
Width = 4455
Begin VB.OptionButton Option3
Caption = "字符串"
Height = 255
Left = 1200
TabIndex = 6
Top = 1560
Width = 1935
End
Begin VB.OptionButton Option2
Caption = "布尔量"
Height = 255
Left = 1200
TabIndex = 5
Top = 1200
Width = 1815
End
Begin VB.OptionButton Option1
Caption = "数字量"
Height = 255
Left = 1200
TabIndex = 4
Top = 840
Value = -1 'True
Width = 1695
End
Begin VB.TextBox Text1
Height = 285
Left = 1200
TabIndex = 2
Text = "Text1"
Top = 360
Width = 3015
End
Begin VB.Label Label2
Caption = "标签类型"
Height = 255
Left = 240
TabIndex = 3
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "标前标识"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 855
End
End
End
Attribute VB_Name = "fAddTag"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim I As Integer
Dim IDOk As Boolean
Text1.Text = Trim(Text1.Text)
If Text1.Text = "" Then
MsgBox ("标签标识不能为空...")
Else
IDOk = True
For I = 1 To TagCount
If TagList(I).TagID = Text1.Text Then
IDOk = False
End If
Next
If IDOk Then
If TagCount < 255 Then
TagCount = TagCount + 1
TagList(TagCount).TagID = Text1.Text
TagList(TagCount).TagHandle = -1
If Option1.Value Then
TagList(TagCount).TagType = 5
TagList(TagCount).TagValue = 0
End If
If Option2.Value Then
TagList(TagCount).TagType = 11
TagList(TagCount).TagValue = False
End If
If Option3.Value Then
TagList(TagCount).TagType = 8
TagList(TagCount).TagValue = ""
End If
TagList(TagCount).Active = False
Else
MsgBox ("标签数量不能超过256个")
End If
Else
MsgBox ("标签名称不能重复...")
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -