C
Cybertof
Hello,
I have a strange behavior.
On a MyForm form, i have a button with this code
----> MessageBox.Show("hello");
When i start the project with this single form
----> Application.Run(new MyForm());
It works : when i click then i have the messagebox and the form still
continues its message loop.
Now if before displaying MyForm, i display another one, when i click the
button, the MessageBox appears, but once clicking OK, the form is closed
! (and no call to this.Close() was done.....)
***************
Sample Code :
***************
//[STAThread]
static void Main(string[] cmdLine )
{
Application.Run(new MyFirstForm()); // (***)
Application.Run(new MyForm());
}
(***) with this line, any click on a button in MyForm to display a
MessageBox will close MyForm.
(if i use Console.WriteLine("test") instead of a MessageBox the form is
not closed....)
Help....
Cybertof.
I have a strange behavior.
On a MyForm form, i have a button with this code
----> MessageBox.Show("hello");
When i start the project with this single form
----> Application.Run(new MyForm());
It works : when i click then i have the messagebox and the form still
continues its message loop.
Now if before displaying MyForm, i display another one, when i click the
button, the MessageBox appears, but once clicking OK, the form is closed
! (and no call to this.Close() was done.....)
***************
Sample Code :
***************
//[STAThread]
static void Main(string[] cmdLine )
{
Application.Run(new MyFirstForm()); // (***)
Application.Run(new MyForm());
}
(***) with this line, any click on a button in MyForm to display a
MessageBox will close MyForm.
(if i use Console.WriteLine("test") instead of a MessageBox the form is
not closed....)
Help....
Cybertof.