473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

form hide

how do i change a form when on a buttonclick?
form1.hide() doesnt work.
Nov 16 '05 #1
4 2192
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bharath Ganesh" <bh***********@gmail.com> wrote in message
news:uX**************@TK2MSFTNGP09.phx.gbl...
how do i change a form when on a buttonclick?
form1.hide() doesnt work.

Nov 16 '05 #2

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!
Nov 16 '05 #3
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!

Nov 16 '05 #4
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 [.NET/C# MVP]" wrote:
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!


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
39
by: jcrouse | last post by:
I am using the following code to get a background image for my form Private Sub mnuBgroundImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuBgroundImage.Clic If...
5
by: Kirk Graves | last post by:
Can anyone tell me why this code does not work? Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Hide() End Sub If runs, but the...
10
by: Partha Protim Roy | last post by:
Hello, My problem is: I got a Login form, so once the user enter vaild Username & Password another form opens. How do I close the login form?
11
by: Alex | last post by:
Hello all, I have a main form(say "form1") .i want to display another form(say "form2") on occuring of an event (say a button click) and want to hide it after some time so that it will again...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
0
rnd me
by: rnd me | last post by:
Purpose: Allows you to create "presets" for text form inputs. "Lightweight and simple to setup, it adds a lot of convenience for ~1kb of code." Only one function, two parameters: First...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.