How to enlarge the window of a mobile window?

how to enlarge windows mobile window?

+2


source to share


3 answers


You may be asking how to make a Windows Mobile form full screen. To do this, set the form to a FormBorderStyle

value None

and set WindowState

to Maximized

. Also, remove the menu bar if the developer will add it automatically.



If you are trying to create a kind of "kiosk" application that includes multiple forms, you will run into a problem when switching forms in the application: the launch bar will flicker backward for a second of a second every time. There is a way to get around this using the Win32 API, but this pain.

+2


source


By default Windows Mobile will always maximize the normal FOrm (and disable the title bar). If you have a non-maximized dialog, it is displayed via ShowDialog (). In this case, the simplest mechanism is to simply change the form in OnActivate to fit the screen. Something like this:



protected override void OnActivated(EventArgs e)
{
    base.OnActivated(e);

    this.Width = Screen.PrimaryScreen.WorkingArea.Width;
    this.Height = Screen.PrimaryScreen.WorkingArea.Height;
}

      

+1


source


Try the following:

this.Width = Screen.PrimaryScreen.Bounds.Width;
this.Height = Screen.PrimaryScreen.Bounds.Height;

      

It works great.

0


source







All Articles