form hide

  • Thread starter Thread starter Bharath Ganesh
  • Start date Start date
Bharath,

What do you mean change a form? Do you want to hide it? You can always
set the Visible property to false, or call the Close method (the Close
method will close the handle).

Hope this helps.
 
Say, my VC# project has 2 forms, form1 and form2.
I have a button button1 in form1.
On clicking button1 my form1 should be hidden and form2 should be made
visible.
what code do i need to write in the button1 click event.?
and what is the difference between hiding form1 and closing form1. what
sould i use?
 
Bharath,

If you want to show form 2, then you have to have a reference to an
instance of it. Now you can get this by passing it to your instance of form
1, or you can create a new one when you click on the button.

If you want to bring form 1 back up again, then I would say hide it. If
you have no more use for it, then I would say close it.
 
Hi Nicholas Paldino

What about my post ASP.NET controls help!!!

sorry if I use this space for answer, but can't you help me?

Nicholas Paldino said:
Bharath,

If you want to show form 2, then you have to have a reference to an
instance of it. Now you can get this by passing it to your instance of form
1, or you can create a new one when you click on the button.

If you want to bring form 1 back up again, then I would say hide it. If
you have no more use for it, then I would say close it.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Bharath Ganesh said:
Say, my VC# project has 2 forms, form1 and form2.
I have a button button1 in form1.
On clicking button1 my form1 should be hidden and form2 should be made
visible.
what code do i need to write in the button1 click event.?
and what is the difference between hiding form1 and closing form1. what
sould i use?
 
Back
Top