Results 1 to 4 of 4

Thread: Create controls at runtime??

  1. #1

    Thread Starter
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754

    Post

    My team leader is having a laugh
    Check this one out...
    We (He) wants to create picture boxes at runtime, as part of a control array (i.e. add/append them to the control array at runtime) Either this is very easy, or i'm going to be ObjPtr'ing my towards a Vtable somewhere in CopyMemory land, (if that makes any sense) Could someone put me out of my misery and tell me if this is possible or not?

    Thanks in Advance
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  2. #2
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258
    This works for winsocks . Put 1 control on the form and set it's index to 0 then
    Code:
     
    Maxsocks% 
    MaxWinsock% = MaxWinsock% + 1
    Load frm_Main.Winsock1(MaxWinsock%)
    []P
    Visual Basic 6 SP4 on win98se

    QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Create a picturebox (picMyPicture) and set it<font color="#007F00">'s index property to 0.
    </font><font color="#00007F">Now</font> you can do something like this.
    Code:
    Load picMyPicture(<font color="#00007F">UBound</font>(picMyPicture()) + 1)
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  4. #4

    Thread Starter
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    Works fine, thanks guys!
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

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