📄 addcell.frm
字号:
VERSION 5.00
Begin VB.Form addcellform
BorderStyle = 1 'Fixed Single
Caption = "成批添加元件"
ClientHeight = 1635
ClientLeft = 45
ClientTop = 330
ClientWidth = 3555
Icon = "addcell.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1635
ScaleWidth = 3555
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text1
Height = 270
Left = 720
TabIndex = 8
Text = "2"
Top = 1320
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 255
Left = 2400
TabIndex = 6
Top = 1320
Width = 1095
End
Begin VB.Frame Frame1
Height = 1215
Left = 0
TabIndex = 0
Top = 0
Width = 3495
Begin VB.OptionButton cells
Caption = "电流源"
Height = 375
Index = 4
Left = 2160
TabIndex = 5
Top = 720
Width = 1095
End
Begin VB.OptionButton cells
Caption = "电压源"
Height = 375
Index = 3
Left = 1080
TabIndex = 4
Top = 720
Width = 1095
End
Begin VB.OptionButton cells
Caption = "电感"
Height = 375
Index = 2
Left = 2400
TabIndex = 3
Top = 240
Width = 855
End
Begin VB.OptionButton cells
Caption = "电容"
Height = 375
Index = 1
Left = 1440
TabIndex = 2
Top = 240
Width = 855
End
Begin VB.OptionButton cells
Caption = "电阻"
Height = 375
Index = 0
Left = 600
TabIndex = 1
Top = 240
Value = -1 'True
Width = 855
End
End
Begin VB.Label Label1
Caption = "数量:"
Height = 255
Left = 120
TabIndex = 7
Top = 1320
Width = 615
End
End
Attribute VB_Name = "addcellform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim values As Integer
Private Sub cells_Click(index As Integer)
values = index
End Sub
Private Sub Command1_Click()
Dim k As Integer
If CInt(Text1.Text) <= 0 Then
MsgBox "请正确输入元件数量!"
Else
For k = 1 To CInt(Text1.Text)
Call mapform.addcell(values)
Call mapform.cell(CInt(counts - 1)).incall
Call mapform.displaycell(CInt(counts - 1))
Next k
End If
End Sub
Private Sub Form_Load()
values = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -