Babali PK

Babali PK

  • NA
  • 9
  • 1.5k

Sharing Data between two forms

Sep 25 2011 10:48 AM
Hi,







I am new to to  this forum and this is my first post. 

I am working on a C# project. General outline of the project is:

FORM 1 collects data as entered by the user (text boxes, radio buttons, check boxes, numeric up-down controls etc) .
 
FORM 1 does some calculations on this data and prepares a text message. I have a class created to do this job and updated Message is with the Class.
 

FORM2 should take this Data and display it using a Rich text box).

User typically opens FORM 2 as and when it is needed to see the Message. User can kill/minimize FORM 2 .  There a button on FORM 1 to show FORM 2.

FORM 1 must update Data on the FORM 2 whenever a new Message is generated provided FORM 2 is either showing or in minimized state.
 

FORM 2 also needs a method to get the message from Form 1 when Form 2 is instanced.



Now I have two FORMs ready, but question is:

1> How to transfer the message from FORM 1 to FORM 2. Can I access object that holds the Message text from FROM 2?

2> FORM 2 can be opened / minimized / killed. I want FORM 1 to refresh the Rich Text box even if the FORM 2 is in minimized condition.
 


Any help?
(Sorry for my bad English, it is my Second language)

Regards

Babali
 


 

Answers (8)