create many pictureboxes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: create many pictureboxes

  1. #1
    Join Date
    May 2004
    Location
    PALM SPRINGS
    Posts
    78

    Angry create many pictureboxes

    Hi ,,,

    Using vb6
    I want to be able to create many pictureboxs with width and heigth supplieD

    Example:

    like this not sure how:

    for i = 0 to 50
    create picturebox(1) wid = 24 and height=25

    next

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Take a look at the Load statement or the Controls.Add method in VB's online help.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Create one PictureBox at design time, and assign the Index to 1. That will create an array with one element.
    At run time, you can create new picture boxes in the same array using the load method, that is
    Load myPicture(k)
    where k is the current index (> 1)
    After the new picture box is loaded, you have to move it in the form in the position you want and assign the Visible property to True

    BTW what is that for? The Picture box takes a lot of resources

    Marco

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center