Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I show a form on a Button Click?

Status
Not open for further replies.

essa2000

Programmer
Dec 6, 2000
299
CA
Dears ;

I want to show a form on a click of a button, as we can do in VB 6.0.

Form1.show

but now, there is no show method in VB.NET and now form is an object of windows class and now we have to inherits windows class. So, now how can we open a form from another form on button click.

I am new to VB.NET
Muhammad Essa Mughal
Software Engineer
essamughal@yahoo.com
 
Visual Basic 6 wasn't fully object orientated, but .net is!

You need to create an object of your form type:

dim frmTemp as new frmYourForm()

then call the '.show' method:

frmTemp.Show

In Visual Basic 6 you had to open a form VBModal for it to be a dialogue but now in .net you can use:

frmTemp.ShowDialogue

Good Luck

Matt
 
Dears;

Thanks for this useful help.
Muhammad Essa Mughal
Software Engineer
essamughal@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top