Sunday, August 2, 2009

In visual basic how would I make Form1 open up to Form2.?

In visual basic how would I make Form1 open up to Form2?


For example, if I wanted an application to open a help menu by clicking a "help" button.

In visual basic how would I make Form1 open up to Form2.?
You select your help button in the forms designer. Then add to it a message handler to click event. VB will write an empty sub for doing that -probably something like "sub helpbutton_click"


Inside it you write the code, which can be this for Form2:





dim F2 as new Form2()


F2.ShowDialog()
Reply:in form 2 use the any command buttons or textbox type following commands





for example





dim a


private sub command1()


a=form1.show


msgbox " Hello welcome to Form1"


end sub


No comments:

Post a Comment