Click to See Complete Forum and Search --> : Modeless window


caperover2002
July 7th, 2008, 08:05 AM
Hi, All,

I am trying to create a splash window using a modeless window. The dialog template is built as usual and is displayed by calling Show() instead of ShowDialog() as for modal window. The problem is that I cannot see any controls in the modeless dialogbox. I am wondering what is wrong. Presumablly, I forgot to set some properties or initialize some components especially for modeless window?

Any clue will be appreciated.


Thanks in advance.

CR

eclipsed4utoo
July 7th, 2008, 08:21 AM
did you change anything in the constructor of the splash form?

make sure you have this line of code in all form constructors:


InitializeComponent();

caperover2002
July 7th, 2008, 09:42 AM
Here is the constructor I have:

InitializeComponent();

this.FormBorderStyle = FormBorderStyle.None;
//this.Opacity = 1;
this.CenterToScreen();
this.Refresh();

It does initialize components.

If I change the method from Show() to ShowDialog(), all the controls apprear as normal.

caperover2002
July 8th, 2008, 12:05 PM
Thanks.