如何在程序运行时动态创建控件数组?
就是运行的时候创建控件数组,而且数组的惟数是可变的
就是运行的时候创建控件数组,而且数组的惟数是可变的
解决方案 »
- 关于excel进程的问题
- closewindow 和 postmessage关闭别的应用程序有何不同?
- 怎样在picture中显示从commondialog中选择出来的gif图片
- 如何在vb里调用crystal report 9?
- MSCHART问题100分奉送
- 关于身份验证的问题,请各位指教!
- 数据库中表的内容通过勾选,有选择的显示问题,--在线等(不好意思,我没分了)
- 求助!
- 如何在2000下用程序屏蔽开始菜单??
- true dbgrid控件怎么使一个网格又下拉的列表弹出来
- ActiveReport中如何分组显示页码?(在线等!)
- 如何将本地数据库的SQL数据,移到局域网中一台计算机Access上?
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.OptionButton OptButton
Caption = "Option2"
Height = 495
Index = 1
Left = 2760
TabIndex = 6
Top = 360
Width = 1215
End
Begin VB.OptionButton OptButton
Caption = "Option1"
Height = 495
Index = 0
Left = 2760
TabIndex = 5
Top = 0
Width = 1215
End
Begin VB.PictureBox PicDisplay
Height = 615
Left = 2520
ScaleHeight = 555
ScaleWidth = 1635
TabIndex = 3
Top = 2280
Width = 1695
End
Begin VB.CommandButton CmdClose
Caption = "关闭"
Height = 495
Left = 480
TabIndex = 2
Top = 2160
Width = 1215
End
Begin VB.CommandButton CmdDelete
Caption = "删除"
Height = 495
Left = 480
TabIndex = 1
Top = 1560
Width = 1215
End
Begin VB.CommandButton CmdAdd
Caption = "增加"
Height = 495
Left = 480
TabIndex = 0
Top = 960
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "选择一个选项按钮"
Height = 180
Left = 240
TabIndex = 4
Top = 120
Width = 1440
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim MaxId As IntegerPrivate Sub CmdAdd_Click()
If MaxId = 0 Then MaxId = 1
If MaxId > 8 Then Exit Sub
MaxId = MaxId + 1
Load OptButton(MaxId)
OptButton(0).SetFocus
OptButton(MaxId).Top = OptButton(MaxId - 1).Top + 400
OptButton(MaxId).Visible = True
OptButton(MaxId).Caption = "Option" & MaxId + 1End SubPrivate Sub CmdClose_Click()
Unload Me
End SubPrivate Sub CmdDelete_Click()
If MaxId <= 1 Then Exit Sub
Unload OptButton(MaxId)
MaxId = MaxId - 1
OptButton(0).SetFocus
End SubPrivate Sub OptButton_Click(index As Integer)
PicDisplay.BackColor = QBColor(index + 1)
End Sub