creating checkboxes dynamically
-
HI guys I'm working in VB6 and I need some help in creating a user control instance in code. I need to create lets say an X number of checkboxes and arrange them within a form. How do I create them dynaically in code to start with. Ay comments would be greatly appreciated :D
-
HI guys I'm working in VB6 and I need some help in creating a user control instance in code. I need to create lets say an X number of checkboxes and arrange them within a form. How do I create them dynaically in code to start with. Ay comments would be greatly appreciated :D
-
It has been a while but I think it is something like this.
dim chkbox as new checkbox
me.controls.add(chkbox)
'or possibly
dim o as object
set o = me.controls.add(chkbox)Michael
note it is for vb6.0 dim chkbox as checkbox set chkbox=controls.add("vb.checkbox","checkbox1") chkbox.visible=true chkbox.left=50 chkbox.height=50 chkbox.enabled=true Note:- u can also change name (the second parameter in controls.add method) by concating string
-
It has been a while but I think it is something like this.
dim chkbox as new checkbox
me.controls.add(chkbox)
'or possibly
dim o as object
set o = me.controls.add(chkbox)Michael
note it is for vb6.0 dim chkbox as checkbox set chkbox=controls.add("vb.checkbox","checkbox1") chkbox.visible=true chkbox.left=50 chkbox.height=50 chkbox.enabled=true u can also change name (the second parameter in controls.add method) by concating string