P
Paez
Hi there.
How can I modify a form control property from another form. Let's say, I
have a frmMain that has a ToolStripMenuItem with the current user info.
Then, I open another form (frmChangeUser) and after I enter a password in
that form, the current user will change and the frmMain ToolStripMenuItem
will also change.
Right now, I have the folowing code:
frmChangeUser:----------------------
(...)
frmMain.CurrentUser = "Administrator";
frmMain.Administrator();
(...)
frmMain:---------------
public static void Administrador()
{
frmMain x = new frmMain();
x.tssUser.Text = CurrentUser;
}
Any help? Thanks in advance...
Paez
How can I modify a form control property from another form. Let's say, I
have a frmMain that has a ToolStripMenuItem with the current user info.
Then, I open another form (frmChangeUser) and after I enter a password in
that form, the current user will change and the frmMain ToolStripMenuItem
will also change.
Right now, I have the folowing code:
frmChangeUser:----------------------
(...)
frmMain.CurrentUser = "Administrator";
frmMain.Administrator();
(...)
frmMain:---------------
public static void Administrador()
{
frmMain x = new frmMain();
x.tssUser.Text = CurrentUser;
}
Any help? Thanks in advance...
Paez