|
-
Mar 9th, 2006, 11:54 PM
#1
Thread Starter
Member
creating new controls...
Hi, I was wondering how to make a new (lets say) text box in VB 2005...I've been working at it ofr a few days and I can't seem to figure it out
-
Mar 10th, 2006, 12:22 AM
#2
Re: creating new controls...
Do you want to dynamically create a textbox, or inherit the textbox and add your own functionality?
-
Mar 10th, 2006, 12:35 AM
#3
Thread Starter
Member
Re: creating new controls...
better example I guess: to make a new web browser than I could control with like back and forward etc. buttons.
-
Mar 10th, 2006, 12:45 AM
#4
Re: creating new controls...
Your question is unclear. Do you mean that you want to know how to create a Web browser application, or how to create a WebBrowser control and add it to your form at run time, or something else? If you mean creating controls at run time then you simply create a new instance of the control, set the appropriate properties like Size and Location, then add it to the Controls collection of the form or container that will hold it. The code is exactly the same as that created by the form designer when you add controls at design time, so you can inspect that code for an example. Go to the Solution Explorer, click the Show All Files button, then open the .designer.vb file for the form to see the autogenerated code. Be careful NOT to change it.
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
|