Full screen modal dialogs

J

Joachim Fuchs

Hi,

I'm working on a full screen application. Using this code from the FAQ
this.WindowState = FormWindowState.Maximized;

this.FormBorderStyle = FormBorderStyle.None;
this.ControlBox = false;
this.Menu = null;

the main window shows up covering the whole screen. If I open a dialog
window that uses the same code, I expect this window to cover the screen
completely:

DialogClass dialog = new DialogClass();
dialog.ShowDialog();

While this works fine on a Toshiba e800 and on the emulator, it doesn't on
an hp ipaq. On this device, either the menubar of the operating system pops
up or the main window can be seen in the background. The dialog window is
positioned 26 Pixel (size of the menu bar) down from the top of the screen.

Using dialog.Show positions the window as expected, but I need
dialog.ShowDialog.
Is this a bug in the ipaq system or in the compact framework? Are there any
work arounds?

Thanks,
Joachim
 
D

Dan Bass

presumably in the parent dialog there's a onclick event which launches the
ShowDialog() for the second child dialog?
If this is the case then you could try this:

this.Hide();
childDialog.ShowModal();
this.Show();
 
J

Joachim Fuchs

Hi Dan,

thanks for your suggestion. I tried your code, but it doesn't change this
behaviour. When the dialog window is shown, the menu bar of the operating
system (with the start button etc.) is shown in the foreground. So the top
of the window is in the background.

Joachim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top