Hi,
can anyone please suggest what is the most efficient method of passing values between Windows forms. I am developing an application For smart devices where we dont have the concept of MDI forms. So how do we pass values between windows forms Is static variables the only option.
Please reply asap.
Thanks,
anzrul

Passing values between windows forms
Borko
Remember to change the scope of any variables on the opened window to be public in scope so that it can be accessed by the opening window.
Neil D
-- Code within a method on main form (frmMain) --
// Show Image Properties form
ImageProperties imgPr = new ImageProperties(
@"c:\temp\file1.jpg");
imgPr.ShowDialog();
// Validate that file still exists after dismissing form
FileInfo fileInfo = new FileInfo(
imgPr.FullFileName.Text);
-- Code on ImageProperties (imgPr) --
// Definition of public textbox
public System.Windows.Forms.TextBox FullFileName;
// Constructor:
public ImageProperties(
string fullFileName)
{
// Capture file name
this.FullFileName.Text = fullFileName;
// Do other work...
....
}
Note that in this case, I use a modal dialog, but the same method will work with non-modal forms as well (called using .Show() rather than .ShowDialog())