R
RSH
Okay in my coninuing forms saga I have a situation where I am spawning a new
form from my main form:
//////////////////////////////////////////////////////////////////////////////////////
frmFindReplace frmFind = new frmFindReplace(this);
frmFind.Show();
bFRVisible = true;
//////////////////////////////////////////////////////////////////////////////////////
Now I would like to reference that form from a different function within the
same main form but I can't figure it out.
I tried:
frmFind.Close();
Error:
Error 1 The name 'frmFind' does not exist in the current context Visual
Studio
2005\Projects\TPAccessToSQLDataTransfer\TPAccessToSQLDataTransfer\frmDataEditGrid.cs
358 5 TPAccessToSQLDataTransfer
frmFindReplace.Close();
Error:
Error 1 An object reference is required for the nonstatic field, method, or
property 'System.Windows.Forms.Form.Close()' Visual Studio
2005\Projects\TPAccessToSQLDataTransfer\TPAccessToSQLDataTransfer\frmDataEditGrid.cs
358 5 TPAccessToSQLDataTransfer
Where am I going wrong here?
Thanks,
Ron
form from my main form:
//////////////////////////////////////////////////////////////////////////////////////
frmFindReplace frmFind = new frmFindReplace(this);
frmFind.Show();
bFRVisible = true;
//////////////////////////////////////////////////////////////////////////////////////
Now I would like to reference that form from a different function within the
same main form but I can't figure it out.
I tried:
frmFind.Close();
Error:
Error 1 The name 'frmFind' does not exist in the current context Visual
Studio
2005\Projects\TPAccessToSQLDataTransfer\TPAccessToSQLDataTransfer\frmDataEditGrid.cs
358 5 TPAccessToSQLDataTransfer
frmFindReplace.Close();
Error:
Error 1 An object reference is required for the nonstatic field, method, or
property 'System.Windows.Forms.Form.Close()' Visual Studio
2005\Projects\TPAccessToSQLDataTransfer\TPAccessToSQLDataTransfer\frmDataEditGrid.cs
358 5 TPAccessToSQLDataTransfer
Where am I going wrong here?
Thanks,
Ron