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 :ehh:
Printable View
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 :ehh:
Do you want to dynamically create a textbox, or inherit the textbox and add your own functionality?
better example I guess: to make a new web browser than I could control with like back and forward etc. buttons.
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.