[HELP] Me With Making Another Form

Posts 1–4 of 4 · Page 1 of 1
[HELP] Me With Making Another Form
Can Some 1 Tell Me How I Can Make A Button That Opens Another Form? Becouse I Wanna Make A Multi Tool
Form2.Show
Me.Hide

~ If you want the first to stay just remove Me.Hide~
Solution-Explorer > Righ***ick on your application > Add > Windows Form



Button_Click event:

Formname.ShowDialog

For instance...

Form2.ShowDialog
On Button Click

Allow only one instance of Form2

[php]
Form2.show
[/php]

Showing it modally

[php]
Form2.showdialog(me)
[/php]

Creating instances of one form to display as many times as you like.

[php]
Dim Sform As New Form2()
Sform.ShowDialog(Me)
[/php]

When you do it modally , the user can't get focus back to form1

So add a me.close to a button on form2 , this will allow you to close the modal and give form1 focus back.

To Hide form use

[php]
form2.hide
[/php]

to close a form

[php]
form2.close
[/php]

or

[php]
me.close
[/php]

depending on if form2 is in focus or not.

To clear form2 from memory and fully close

[php]
form2.dispose()
[/php]

Probably a little more then you needed, but will help in about an hour or so when the other questions start popping up
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us