Results 1 to 17 of 17

Thread: A Form In A Ctrl Array And Then...

Threaded View

  1. #1

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    A Form In A Ctrl Array And Then...

    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...
    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
    !! Thanks in advance !!
    Last edited by ThEiMp; Jul 14th, 2010 at 08:51 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width