|
Thanks:withsprite, andooloife
The original problem has been solved, I have one more question, let’s ask it, haha :)
I define variables in the frmLogin class:
public int intYear; //Year of registration date
public byte bytePeriod; //The period of the registration date
Call it in frmMain:
//Display the login window
private void ShowLogin()
{
frmLogin LoginFrm = new frmLogin();
DialogResult dr = LoginFrm.ShowDialog();
if (dr == DialogResult.OK)
{
SLblOperator.Text = LoginFrm.strOperator;
SLblPeriod.Text = LoginFrm.intYear.ToString() + "year" + LoginFrm.bytePeriod.ToString() + "period";
SLblRegDate.Text = LoginFrm.strRegDate;
}
else
{
Close();
}
}
There is a warning after compiling: Since "HLLW.frmLogin.intYear" is a field that refers to the marshaled class, accessing the above members may cause runtime exceptions. Also, because "HLLW.frmLogin.bytePeriod" is a field that references the marshaling class, accessing the above members may cause runtime exceptions.
What caused this warning to occur? |
|