windows ce 5.0下怎样控制任务栏的显示隐藏呢?

ping_2009 2009-10-21 05:31:26
一个窗体运行时是全屏显示的,我想在某个输入框获得焦点时让任务栏显示,失去焦点时让任务栏隐藏,代码怎么写呢?
...全文
387 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ping_2009 2009-10-22
  • 打赏
  • 举报
回复
问题解决了

[DllImport("coredll.dll")]
public static extern int FindWindow(string lpClassName, string lpWindowName);
[DllImport("coredll.dll")]
internal extern static int EnableWindow(int hwnd, int fEnable);
[DllImport("coredll.dll")]
public static extern int ShowWindow(int hwnd, int nCmdShow);

/// <summary>
/// 根据参数控制任务栏的显示与否
/// </summary>
/// <param name="showTemp">0:隐藏;1:显示</param>
public static void controlShow_Hide(int showTemp)
{
int hTaskBarWnd = FindWindow("HHTaskBar", null);
ShowWindow(hTaskBarWnd, showTemp);
}
使用的时候直接调用controlShow_Hide方法就可以了
ping_2009 2009-10-22
  • 打赏
  • 举报
回复
还有人知道吗?
91program 2009-10-21
  • 打赏
  • 举报
回复
.net下,也有调用系统API的方法的

LZ去google一下
ping_2009 2009-10-21
  • 打赏
  • 举报
回复
这个我也搜到了,但是我现在的问题主要是不知道在c#.net中应该用哪个函数啊?
seemknow 2009-10-21
  • 打赏
  • 举报
回复
C#不会。它哥能否参考

{
// hide the task bar to use a full screen.
HWND hWndTaskBar = FindWindow(_T("HHTaskBar"), _T(""));
if(hWndTaskBar && ::IsWindow(hWndTaskBar))
ShowWindow(hWndTaskBar, SW_HIDE);
}

{
// show task bar
HWND hWndTaskBar = FindWindow(_T("HHTaskBar"), _T(""));
if(hWndTaskBar && ::IsWindow(hWndTaskBar))
ShowWindow(hWndTaskBar, SW_SHOW);
}

ping_2009 2009-10-21
  • 打赏
  • 举报
回复
补充下,我用的语言是c#.net

19,502

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧