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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading controls at run-time problem

Status
Not open for further replies.

davidewan

Programmer
Aug 4, 2000
16
CA
I want to Load user controls at run-time. To do this I have created control arrays at design-time (e.g. UCtrl(0)). The problem is at run-time the new controls (e.g. UCtrl(1)) drop into the container of the original (e.g. UCtrl(0)) - in this case a PictureBox - and I cannot move it to any other container - for example PictureBox2.

UCtrl(1).Container = PictureBox2 does not work.

Am I missing something? I believe UCtrl(1) is created by running a "copy-constructor" (if you'll excuse the C++ reference) on UCtrl(0) so I understand why it starts out in the same container, but why can't I then move it? For good reasons certain controls (e.g. option-like controls) I want to cluster to different containers. Thanks in advance. DEM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top