Yves
Yves

Reputation: 702

How do I hide the Windows CE Taskbar and show a program window at full screen?

I'm working with VB.Net on a Windows CE mobile device. I'm trying to show my forms at "full screen" (that is, covering the entire screen, even on top of the task bar) while not allowing the form to be moved/dragged. So far, I've only achieve either:

I've tried SetWindowPos, but the taskbar is still there. Code below:

' this code is from the main form's load event
CDevice.HideTaskBar(Me)
Me.AutoScroll = False
Me.WindowState = FormWindowState.Maximized

And here is the definition for HideTaskBar (from the code above):

Public Const SWP_NOSIZE As Int32 = &H1
Public Const SWP_NOMOVE As Int32 = &H2
Public Shared Sub HideTaskBar(ByRef obj As Form)
    Dim taskhWin = FindWindow("HHTaskBar", Nothing)
    SetWindowPos(taskhWin, New IntPtr(-1), 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
    SetWindowPos(obj.Handle, New IntPtr(1), 0, 0, 240, 320, 0)
End Sub

Upvotes: 0

Views: 5383

Answers (2)

josef
josef

Reputation: 5959

Although WindowsCE (what version do you have?) behaves a bit different, take a look here: http://www.hjgode.de/wp/2012/05/10/windows-mobile-kiosk-mode-series-part-1/ Although I coded in C# you should be able to translate it to VB. See code here: http://code.google.com/p/weh653kiosmodes/source/browse/trunk/OEMTitleBarHandler/OEMTitleBarHandler/FullScreen.cs

  • First hide the taskbar

  • Use a form without caption bar (no title bar)

  • Query the systems screen dimensions

  • Resize and move the form to fill the screen dimensions or try Form.WindowState=Maximized.

Upvotes: 1

PaulH
PaulH

Reputation: 7863

Try: SetWindowPos(taskhWin, 0, 0, 0, 0, 0, SWP_HIDEWINDOW);

See Also: http://blogs.msdn.com/b/raffael/archive/2008/03/01/supporting-kiosk-applications-on-windows-mobile-technically-achievable-vs-supported.aspx

Upvotes: 0

Related Questions