|
-
Aug 16th, 2001, 05:20 AM
#1
How to load controls in run time
Say I load controls from a menu control on a MDI form like this:
Private sub mnuNewdevice_click()
load commandbutton(index)
commandbutton(index).picture=....
commandbutton(index).caption=....
commandbutton(index).left=...
commandbutton(index).top=...
commandbutton(index).height=...
commandbutton(index).width=...
...
commandbutton(index).visible=true
End sub
The trouble is that this code load the control on the MDI form, not in other different form. In short, how can I load controls on a not current form in run time?
By the way, the following code not work:
load frmDesing.commandbutton(index)
Or,
frmDesign. load commandbutton(index)
Or,
frmDesign = load(commandbutton(index))
Thanks in advance an sorry for being so long..
Cris
-
Aug 16th, 2001, 03:16 PM
#2
Addicted Member
You could create a hidden button on each form, then have its click event call a special LoadControl function that you create. That way, you could possibly tell a specific form to load a control?
Hope that helps.
The answer is 42. Sadly, you can't typecast the "answer" data type to the "question" data type.
Code:
Take.Me( To( Your.Leader ) )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|