View Single Post
  #2 (permalink)  
Old February 17th, 2008, 06:15 PM
samjudson's Avatar
samjudson samjudson is offline
Friend of Wrox
Points: 4,453, Level: 28
Points: 4,453, Level: 28 Points: 4,453, Level: 28 Points: 4,453, Level: 28
Activity: 61%
Activity: 61% Activity: 61% Activity: 61%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 1,359
Thanks: 0
Thanked 31 Times in 31 Posts
Default

The best way is to define a public property on one form:

public string TheProperty
{
  get { return _myProperty; }
}

Then you can call it from the other form, provided you have a reference to the other form:

MyForm form = (MyForm)formReference;
Console.WriteLine(form.TheProperty);

If this doesn't help then you'll have to be more specific in your requirements.


/- Sam Judson : Wrox Technical Editor -/
Reply With Quote