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]
-
mv*@spam.guard.caspershouse.com
"Bharath Ganesh" <bh***********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!