B
Bharath Ganesh
how do i change a form when on a buttonclick?
form1.hide() doesnt work.
form1.hide() doesnt work.
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?