Hi, I have a simple windows application in C# with 3 forms. first form is main form (its name is FrmMain), second is FrmData and third is FrmShow. In main form (FrmMain) I have created an instance from second form (FrmData) and show it :
public partial class FrmMain : Form
{
public Form FrmModifyData; //for FrmData
int PersonCode;
public FrmMain()
{
InitializeComponent();
}
private void btnShowDataForm_Click(object sender, EventArgs e)
{
FrmModifyData= new FrmData();
FrmModifyData.ShowDialog();
}
}
but I can't access from FrmModifyData to FrmMain fields like PersonCode . How can I access to creator object's field?
Note: I'm a beginner.
thanks.