S
Soren-a
Hi
I have a problem in a C#.NET CF program that I am working on at it is
driving me nuts!
I have two form "StatusBarForm" and "LoginForm".
In the "StatusBarForm" I declear a Panel ("pnlStatus1") and a Label
("lblLoginNavn") like this:
public class StatusBarForm : System.Windows.Forms.Form
{
public System.Windows.Forms.Panel pnlStatus1;
public Label lblLoginNavn = new Label();
public StatusBarForm()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
Windows Form Designer generated code
}
}
The idea now is to create the "lblLoginNavn" label in a click event on
the "LoginForm" form. I do it like this:
First I decleare a new instanse of the "StatusBarForm", and then I
create the "lblLoginNavn" label on the "StatusBarForm" and add it to
the "pnlStatus1" panel.
I do it like this:
public class LoginForm : System.Windows.Forms.Form
{
StatusBarForm StatusBaren = new StatusBarForm();
I have a problem in a C#.NET CF program that I am working on at it is
driving me nuts!
I have two form "StatusBarForm" and "LoginForm".
In the "StatusBarForm" I declear a Panel ("pnlStatus1") and a Label
("lblLoginNavn") like this:
public class StatusBarForm : System.Windows.Forms.Form
{
public System.Windows.Forms.Panel pnlStatus1;
public Label lblLoginNavn = new Label();
public StatusBarForm()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
Windows Form Designer generated code
}
}
The idea now is to create the "lblLoginNavn" label in a click event on
the "LoginForm" form. I do it like this:
First I decleare a new instanse of the "StatusBarForm", and then I
create the "lblLoginNavn" label on the "StatusBarForm" and add it to
the "pnlStatus1" panel.
I do it like this:
public class LoginForm : System.Windows.Forms.Form
{
StatusBarForm StatusBaren = new StatusBarForm();