Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Dynamic Runtime Creation

Question:
Is it possible to add elements to a control array of an object (ex. SSPanel) in a module that is not the form's module. My goal is to be able to pass an object that is a single element of a control array and an integer representing the number of elements I would like added to the array and have them created at run time. I have tried using the load command but it doesn't let me execute this in a separate module outside of the form.

Answer:
The control array has to be created at design time, even if it just has one element. Once that is done, your code can execute a line like "Dim sNew as New SSPanel", set it equal to a new element in your control array.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date