|
-
April 16th, 2001, 09:35 PM
#1
Drawing controls on a form at runtime like VB does?
Hello,
I would like to know how you can dynamically add controls to a form by allowing the user to draw the control onto the form like you do in VB when you design a program.
Any help would be appreciated.
-
April 17th, 2001, 04:36 AM
#2
Re: Drawing controls on a form at runtime like VB does?
You need to start with one of each typoe of control with the index 0 on your form.
To add a new control you need to:
Load (TextBoxCtl(TextBoxCtl.Count))
Then you need to simulate the size boxes. I'd suggest picture boxes about 5 pixels square with their background dark blue or black. In the picturebox MouseMove event, if the left button is down, vreate a drag outline and when the button is released resize the control to that outline's size.
HTH,
D.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
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
|