Handling Forms

  • Thread starter Thread starter sravan_reddy001
  • Start date Start date
S

sravan_reddy001

i hav created two froms in my application

Form1 and Form2

i called the form2 from the form1.
i want only one form to be visible at a file

i made the form1 disappear (while calling form2) using
form1.visible = false

i want to assign the form1.visible = true when i close the form2

how can i handle this event in form2 so that i can set form1.visible =
true in form2 closing event
 
sravan,

Have a look if you can use a showdialog form, in most situations that is
what is needed.

frm.showdialog instead of frm.show

Cor
 
sraven,

Instead of making Form1 invisible when you show Form2, why not call
ShowDialog, which will force Form2 to keep focus and stay on top until it is
closed?

However, what about something like:

Dim frm As New Form2
frm.ShowDialog()
Me.Visible = True

Hope this helps,


Steve
 
Back
Top