Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load Objects 1

Status
Not open for further replies.

JJ1

Programmer
Apr 19, 2001
104
GB
Hi All,

Could anyone tell me if it is possible to load new objects, such as a "picture box", but NOT in the form_load event.

I have tried the following:
I Created a PictureBox and called it "Picture1"


dim mypicturebox As Picture1
load mypicturebox


Thanks in advance,


James.
 
You can create picture one on your form, set the visible property to FALSE, then set the visible property to TRUE when required.

If you set the index property to 0 you will be able to use

LOAD Picture1(1)

to load a second box and create a control array. You can then add as many picture boxes as you like, whenever you like.

Hope this helps,

Dan.
 
For the Load method, the object must already exist as a control array on the form. Define one control of the type you want to "clone" at run time WITH INDEX 0. Then
LOAD controlarray(controlarray.Ubound + 1)
to creat new one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top