I am making a Form Control Array, that part I have down pat. But then trying to get a PictureBox to be different sizes, in each of them. Or atleast it can be, if you choose the same command button to do that, then it will be the same. The sizes of the PictureBox is pre-defined at design-time and assigned to a Command Button as such.
How can I do this, and make it work right. I have tried everything. So then trying to ask the Lex-Mechanics (Programmers) of the Forum to help me.
Here is the current Source Code that I am working on...
!! Thanks in advance !!Code:Public Sub Command1_Click() On Error Resume Next Dim NF As New Form11 ReDim Preserve F(CountOfForms) As Form If Form2.Text4.Text = "0" Then l = 0 l = l + 1 Else If Form2.Text4.Text = "" Then l = l + 1 End If End If Filename = Form2.Text2.Text Load NF NF.Hide Set F(CountOfForms) = NF CountOfForms = CountOfForms + 1 Rem This is the Exit Sub. If Form2.Text1.Text = "0" Then Exit Sub Else Rem This is the Open. If Form2.Text1.Text = "1" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 320 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the Save As. If Form2.Text1.Text = "2" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 320 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the Colour Chooser. If Form2.Text1.Text = "4" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 320 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the Printer Setup. If Form2.Text1.Text = "5" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 320 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the Font Chooser. If Form2.Text1.Text = "6" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 320 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the Dialog Box. If Form2.Text1.Text = "7" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 320 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the User Form. If Form2.Text1.Text = "8" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = True NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 900 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 1400 Else Rem This is the Video in a Window. If Form2.Text1.Text = "9" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 200 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 460 Else Rem This is the Splash Screen. If Form2.Text1.Text = "10" Then Form10.Combo16.Enabled = True Form10.Combo16.AddItem "Form" & l NF.TitleBar1.Visible = False NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 480 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 720 Else Rem This is the Message Box. If Form2.Text1.Text = "11" Then NF.TitleBar1.Visible = True NF.MenuBar1.Visible = False NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Height = 300 NF.BackGround1(Form1.List1.ItemData(Form1.List1.ListIndex)).Width = 720 End If End If End If End If End If End If End If End If End If End If End If NF.Hide Form1.cmd_MakeMenu1.Enabled = True Form1.MenuBar_Insert.Enabled = True Form1.List1.AddItem "Form" & l & ":" & " " & Filename & ".frm" Form1.List1.ItemData(Form1.List1.NewIndex) = l Form12.Combo4.AddItem "Form" & l Form12.Combo4.ItemData(Form12.Combo4.NewIndex) = l Form10.Combo19.AddItem "Form" & l Form12.List1.AddItem "Form" & l Form12.lstKeywords.AddItem "Form" & l Form14.Combo2.AddItem "Form" & l Form14.Combo1.AddItem "Form" Form2.Hide Form10.Hide Form12.Hide Form13.Hide Form14.Hide Form2.Text1.Text = "0" Form2.Text2.Text = "Untitled" & ".frm" Form1.Text2.Text = "1" Form2.Text4.Text = "" Form1.DrawGuides_View.Enabled = True Form2.Text2.Enabled = False Form2.Command1.Enabled = False Form1.Enabled = True Form10.Enabled = True Form11.Enabled = True Form12.Enabled = True Form13.Enabled = True Form14.Enabled = True End Sub




Reply With Quote