当前位置: 代码迷 >> WinCE >> WINCE6.0怎么隐藏“开始”菜单
  详细解决方案

WINCE6.0怎么隐藏“开始”菜单

热度:65   发布时间:2016-04-28 13:19:48.0
WINCE6.0如何隐藏“开始”菜单
如题,我们想做到可以方便隐藏和显示“开始”菜单,不知道大家有什么好的办法可以分享一下,在此先表示谢谢了。

------解决方案--------------------

做成模块了,你直接调用吧
VB.NET code
Imports System.Runtime.InteropServices'Imports Microsoft.VisualBasicModule hideshowtask    Const SW_HIDE As Integer = &H0    Const SW_SHOW As Integer = &H1    Public Hwnd As Integer    <DllImport("Coredll.dll")> _    Private Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As Integer    End Function    <DllImport("Coredll.dll")> _    Private Function EnableWindow(ByVal hwnd As Integer, ByVal fEnable As Integer) As Boolean    End Function    <DllImport("Coredll.dll")> _       Private Function ShowWindow(ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Boolean    End Function    Sub showtaskbar()        '   Try        Hwnd = FindWindow("HHTaskBar", Nothing)        ShowWindow(Hwnd, SW_SHOW)        '  EnableWindow(Hwnd, True)        '  Catch 'ex As Exception        '  End Try    End Sub    Sub hidetaskbar()        '  Try        Hwnd = FindWindow("HHTaskBar", Nothing)        ShowWindow(Hwnd, SW_HIDE)        '  EnableWindow(Hwnd, False)        '  Catch ' ex As Exception        '  End Try    End SubEnd Module
------解决方案--------------------
如果想隐藏整个任务栏,先FindWindow,在用ShowWindow隐藏就可以了。
如:
HWND hTaskBar;
hTaskBar = ::FindWindow(TEXT("HHTaskBar"), NULL); 
if(FALSE==::IsWindowVisible(hTaskBar))
{
::ShowWindow(hTaskBar,SW_SHOWNORMAL); // 显示任务栏
}
else
{
::ShowWindow(hTaskBar,SW_HIDE); // 隐藏任务栏
}

如果是只隐藏“开始”按钮,楼主可以用一下SHFullScreen函数。

如:(mfc代码)
SHFullScreen(m_hWnd, SHFS_HIDESTARTICON);
这是隐藏“开始”按钮,不过所谓的隐藏是隐藏点击“开始”按钮之后弹出的开始菜单。
也就是隐藏之后,“开始”按钮的图标还在,但点击它没有什么效果。

恢复“开始”按钮:
SHFullScreen(m_hWnd, SHFS_SHOWSTARTICON);
------解决方案--------------------
SHFS_HIDESTARTICON的效果,msdn里面的解释:
SHFS_HIDESTARTICON:
Hide the Start button icon on the navigation bar. When the Start icon is hidden, the shell is in a special state in which clicking or tapping the navigation bar will not display the drop-down Start menu. The navigation bar is essentially disabled when in this state. While in this mode, WM_LBUTTONDOWN and WM_LBUTTONUP messages will be forwarded to hwndRequester. This allows an application to drop out of this mode by calling this function with the SHFS_SHOWSTARTICON, when the user clicks or taps the navigation bar.
------解决方案--------------------
一直没有找到什么好的方法
------解决方案--------------------
最根本的从定制系统从手,是最彻底的方法。
------解决方案--------------------
探讨
引用:
做成模块了,你直接调用吧

VB.NET code


Imports System.Runtime.InteropServices
'Imports Microsoft.VisualBasic

Module hideshowtask
Const SW_HIDE As Integer = &amp;amp;H0
Const SW_SHO……
  相关解决方案