开发者

How to hide Start button while openning camera using CameraCaptureDialog in windows mobile

开发者 https://www.devze.com 2022-12-16 01:28 出处:网络
How to hide Start button while openning camera using CameraCa开发者_StackOverflowptureDialog in windows mobileDo you just want to hide the Start button, or the whole taskbar?

How to hide Start button while openning camera using CameraCa开发者_StackOverflowptureDialog in windows mobile


Do you just want to hide the Start button, or the whole taskbar?

You can hide and show the complete taskbar by using this code:

[DllImport("coredll", EntryPoint = "FindWindow")]
public static extern IntPtr FindWindow(
    [In] string lpClassName,
    [In] string lpWindowName);

[DllImport("coredll", EntryPoint = "ShowWindow")]
public static extern bool ShowWindow(
    [In] IntPtr hWnd,
    [In] int nCmdShow);

[DllImport("coredll", EntryPoint = "EnableWindow")]
public static extern bool EnableWindow(
    [In] IntPtr hWnd,
    [In] bool bEnable);

public const int SW_HIDE = 0x0000;
public const int SW_SHOW = 0x0001;

public static void HideTaskBar()
{
   IntPtr hWnd = FindWindow("HHTaskBar", null);
   EnableWindow(hWnd, false);
   ShowWindow(hWnd, Win32.SW_HIDE);
}

public static void ShowTaskBar()
{
   IntPtr hWnd = FindWindow("HHTaskBar", null);
   EnableWindow(hWnd, true);
   ShowWindow(hWnd, Win32.SW_SHOW);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消