1

I hid task bar at the bottom of the screen with the function

KioskMode.Execute("HHTaskBar", false);

Now I wish to ensure that the form take all screen i have try:

 public static void InitializeKioskMode(Form p_Form)
    {
    p_Form.FormBorderStyle = FormBorderStyle.Sizable;
    p_Form.FormBorderStyle = FormBorderStyle.None;
    p_Form.WindowState = FormWindowState.Maximized;
        p_Form.Width = Screen.PrimaryScreen.WorkingArea.Width;
        p_Form.Height = Screen.PrimaryScreen.WorkingArea.Height;
     }

the form won't take full screen i always have a empty space on the buttom of the screen (the space of the task bar wich i hid )

Anyone know how can i resolve the problem please ?

Any help will be appreciated

Edit:

I found solution here: Fullscreen app in wince 6.0 c#

the important thing is p_Form.WindowState = FormWindowState.Normal;

after that i use something like this:

        IntPtr iptrTB = FindWindow("HHTaskBar", null);
        MoveWindow(iptrTB, 0, Screen.PrimaryScreen.Bounds.Height,
        Screen.PrimaryScreen.Bounds.Width, 26, true);
    [DllImport("coredll.dll")]
    private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
    [DllImport("Coredll")]
    internal static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
Community
  • 1
  • 1
tamtoum1987
  • 1,957
  • 3
  • 27
  • 56

1 Answers1

0

I found solution here: Fullscreen app in wince 6.0 c#

the important thing is p_Form.WindowState = FormWindowState.Normal;

after that i use something like this:

        IntPtr iptrTB = FindWindow("HHTaskBar", null);
        MoveWindow(iptrTB, 0, Screen.PrimaryScreen.Bounds.Height,
        Screen.PrimaryScreen.Bounds.Width, 26, true);
    [DllImport("coredll.dll")]
    private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
    [DllImport("Coredll")]
    internal static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
Community
  • 1
  • 1
tamtoum1987
  • 1,957
  • 3
  • 27
  • 56