Browse DevX
Sign up for e-mail newsletters from DevX

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



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Dynamic Runtime Creation

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.

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.



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