how to hide taskbar on wince.NET platform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I hide taskbar on wince.NET 4.2 platform(no autohide)I want it disappear completely while my application is running?

thanks..
 
I've not done this in .NET CF, but you basically want to get a handle to the
taskbar window using FindWindow( "HHTaskBar" ), disable it with
EnableWindow( hwnd, FALSE ), and call ShowWindow( hwnd, SW_HIDE ).

Paul T.

ibad said:
How can I hide taskbar on wince.NET 4.2 platform(no autohide)I want it
disappear completely while my application is running??
 
I tried the following code but it didn't work.It throws "System.NotSupportedException" when executing ;
hTaskBarWnd = FindWindow("HHTaskBar", "")


Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long

Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
Const GW_CHILD = 5
Const GW_HWNDNEXT = 2
Const GW_HWNDFIRST = 0

Private Sub Form_Load()
Dim hTaskBarWnd As Long
hTaskBarWnd = FindWindow("HHTaskBar", "")
If (hTaskBarWnd) Then

'disable and hide the taskbar
EnableWindow(hTaskBarWnd, False)
'ShowWindow(hTaskBarWnd, SW_HIDE);
End If
End Sub
 
It's because the return is an Integer. Long in .NET is 64-bit

-Chris


ibad said:
I tried the following code but it didn't work.It throws
"System.NotSupportedException" when executing ;
hTaskBarWnd = FindWindow("HHTaskBar", "")


Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long,
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As
Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA"
(ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long)
As Long
 
Back
Top