Handling Forms

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
 
C

Cor Ligthert [MVP]

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
 
P

PlatinumBay

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top