Board index » Visual Studio » Adding Form2

Adding Form2

Visual Studio245
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.


-
 

Re:Adding Form2

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





-

Re:Adding Form2

* "Rob" <rls_jls@worldnet.att.net>scripsit:

Quote
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:dotnet.mvps.org/>">dotnet.mvps.org/>

-

Re:Adding Form2

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/default.asp?url" rel="nofollow" target="_blank">msdn.microsoft.com/library/default.asp=/library/en-us/dv_vstechart/html/vbtchWorkingWithMultipleFormsInVisualBasicNETUpgradingToNET.asp





"Rob" <rls_jls@worldnet.att.net>wrote in message

Quote
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.









-