Results 1 to 4 of 4

Thread: How can i create controls at runtime?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Carolina, Puerto Rico, USA
    Posts
    227
    Hi, im having a hard time trying to create controls at runtime, i tried the help library of msdn but it didint help much, i will appreciate any help, thanks!!

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    I can see what u mean ...

    I had the same prob ..

    You need to put a control on the form

    make its index property to 0

    when ever you want to make another one

    it goes like

    load controlname (index number that doesn't exist yet)

    then you can change any of its proprties example:

    controlname (new index).caption="Ggg"

    helped ?

    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    In VB6 you can create the button without using any controlarrays:
    Code:
    'in declarations
    Public WithEvents cb As CommandButton
    'in code
        Set cb = Controls.Add("VB.CommandButton", "commandos")
        cb.Visible = True
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Carolina, Puerto Rico, USA
    Posts
    227

    Thanks

    Thanks, that helped a lot !!!!!!

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