how to maximize a windows mobile window ?
By default Windows Mobile will always maximize a normal FOrm (and strip off the caption bar). If you have a non-maximized dialog, then it's being shown via ShowDialog(). If that's the case, the simplest mechanism is to just resize the Form in OnActivate to be the screen dimensions. Something along these lines:
protected override void OnActivated(EventArgs e)
{
base.OnActivated(e);
this.Width = Screen.PrimaryScreen.WorkingArea.Width;
this.Height = Screen.PrimaryScreen.WorkingArea.Height;
}
You might be asking about how to make a Windows Mobile form take up the entire screen. To do this, set the form's FormBorderStyle
to None
, and set the WindowState
to Maximized
. Also, delete the menu bar if one has been automatically added by the designer.
If you're trying to make a sort of "kiosk" app that involves multiple forms, you'll run into an issue when you switch forms within the application: the start bar will flicker back up for a split second each time. There is a way around this using the Win32 API, but it's a pain.