PC Review


Reply
Thread Tools Rate Thread

Adding Form2

 
 
Rob
Guest
Posts: n/a
 
      17th May 2004
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.


 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      17th May 2004
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


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      17th May 2004
* "Rob" <(E-Mail Removed)> 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/>
 
Reply With Quote
 
Mike Johnson
Guest
Posts: n/a
 
      17th May 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form2 DataGridView to Form2.. =?Utf-8?B?QWJkU29s?= Microsoft C# .NET 2 26th Apr 2005 08:30 AM
Form2 open and Fill in Form1 panel, but Form2 "Activited" not functioning A-PK Microsoft Dot NET Framework Forms 0 19th Mar 2004 07:56 AM
Form1 open Form2, Form2 how to change text in Form1.label ? Tee Microsoft VB .NET 3 11th Mar 2004 08:49 AM
form2.show 1 Will Microsoft VB .NET 3 8th Jan 2004 11:29 PM
form1 and form2 james ou Microsoft Dot NET Framework Forms 6 6th Nov 2003 06:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:23 AM.