rhaazy, the easy way is to...
Create some public properties that return the textbox.text of the
dialog's textboxes, and then retrieve the values in your main form just
after the line that shows your dialogue - which is where your main form
will start executing again after the dialog is closed.
ie
class MainForm
{
private string m_sStringFromDialog;
private void ShowMyDialogue()
{
//create a new dialog object called 'frm'
....
//show the dialogue
frm.ShowDialog();
m_sStringFromDialog = frm.MyString
}
....
}
class OtherDialog
{
public string _Text1 { get { return TextBox1.Text; } }
....
}
rhaazy wrote:
I have a windows form that loads and displays a dialog box...
The user inputs a few strings into this dialog box.
I want to be able to store these strings and make them accessible to
the scope of the entire application.
So my question is how do I make reference to a string that was
inititilized somewhere else?