Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21256

[RESOLVED] OLD TOPIC - Creating a Control Array at Runtime (But with IDE' blank')

$
0
0
Does this statement from MS (still) apply, or is there a way to do this?

Quote:

Adding Controls at Run Time

In Visual Basic 6.0, controls could be added to a control array at run time using the Load statement. The controls had to be of the same type as the control array, and the control array had to be created at design time with at lest one element. After adding the control, the Visible property had to be set to True.
I would LIKE to be able to create a control array without having to first place a control (Index prop set to 0) on the form first. IOW, I would like to start with a blank form, add a control array, say, of three commandbuttons.

EDIT: The reason for asking, is that if an OP wants an example, one could post JUST code, and not have to have the OP create ANYTHING on a form...just copy the code into a blank form and go from there. I know you can do it for controls themselves, but how about control arrays?

Viewing all articles
Browse latest Browse all 21256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>