By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,652 Members | 1,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,652 IT Pros & Developers. It's quick & easy.

Adding Form2

P: n/a
Rob
I want to add a second Windows Form to my app, but do not
know how to implement communication between the 2 Forms.
I want to be able to open and close Form2 from a button on
Form1 and need to know if Form2 is open or closed. Also,
I would like to open and close Form2 without causing logic
conflicts on Form1. I know in Visual J++6 they use an
interface to communicate between 2 Forms. My question is
How ? How do the 2 Forms communicate with one another ?
Please help RS.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Rob,

When you really want to open and close it from everywhere then you get fast
strange not logical situations.

I think it is better to make form2 visable or/and hide it from your form1
and from your form2.

Just my thought.

Cor
Nov 20 '05 #2

P: n/a
* "Rob" <rl*****@worldnet.att.net> scripsit:
I want to add a second Windows Form to my app, but do not
know how to implement communication between the 2 Forms.
I want to be able to open and close Form2 from a button on
Form1 and need to know if Form2 is open or closed. Also,
I would like to open and close Form2 without causing logic
conflicts on Form1.


In the simplest case, you will have to pass a reference to the other
form. This reference can be used to close the form.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

P: n/a
This article was very helpful to me on understanding how to work with Forms
in VB.Net

This article was provided to me by Cor Ligrhert, Thanks very much.

You may want to read the following MSDN article.
http://msdn.microsoft.com/library/de...adingToNET.asp
"Rob" <rl*****@worldnet.att.net> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl...
I want to add a second Windows Form to my app, but do not
know how to implement communication between the 2 Forms.
I want to be able to open and close Form2 from a button on
Form1 and need to know if Form2 is open or closed. Also,
I would like to open and close Form2 without causing logic
conflicts on Form1. I know in Visual J++6 they use an
interface to communicate between 2 Forms. My question is
How ? How do the 2 Forms communicate with one another ?
Please help RS.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.