- Private Function AddFrames()
- Dim i As Integer
- Dim T As Integer
- 'Dim Index As Integer
-
- T = CInt(MyNbr.Text)
-
- For i = 1 To T
- Dim Myframe As Frame
- Set Myframe = Form1.Controls.Add("VB.Frame", "Index" & i)
-
-
- Myframe.Width = 2500
- Myframe.Height = 1000
- Myframe.Top = 150 + i * 1000 + 10
- Myframe.Left = 400
- Myframe.Visible = True
-
- For j = 10 To 12
- X = j - 9
- Dim MyoptionButton As OptionButton
- Set MyoptionButton = Form1.Controls.Add("VB.OptionButton", "OBIndex" & (j * i))
- MyoptionButton.Width = 1500
- MyoptionButton.Height = 100
- MyoptionButton.Top = 10 + X * 250
- MyoptionButton.Left = 100
- MyoptionButton.Caption = "OBIndex" & (j * i)
-
- MyoptionButton.Visible = True
- Set MyoptionButton.Container = Myframe
-
- Next
-
-
-
- Next
-
- Form1.Height = 1500 + i * 1000 + i * 10
-
-
-
-
- End Function
Private Function AddFrames()
Dim i As Integer
Dim T As Integer
'Dim Index As Integer
T = CInt(MyNbr.Text)
For i = 1 To T
Dim Myframe As Frame
Set Myframe = Form1.Controls.Add("VB.Frame", "Index" & i)
Myframe.Width = 2500
Myframe.Height = 1000
Myframe.Top = 150 + i * 1000 + 10
Myframe.Left = 400
Myframe.Visible = True
For j = 10 To 12
X = j - 9
Dim MyoptionButton As OptionButton
Set MyoptionButton = Form1.Controls.Add("VB.OptionButton", "OBIndex" & (j * i))
MyoptionButton.Width = 1500
MyoptionButton.Height = 100
MyoptionButton.Top = 10 + X * 250
MyoptionButton.Left = 100
MyoptionButton.Caption = "OBIndex" & (j * i)
MyoptionButton.Visible = True
Set MyoptionButton.Container = Myframe
Next
Next
Form1.Height = 1500 + i * 1000 + i * 10
End Function