阅读:        作者:ㄟ荖樹炪厊ㄖ

任务栏的显示与隐藏

// - 隐藏或显示任务栏 - [Start] -
[DllImport("User32.dll")]
public static extern IntPtr FindWindowEx(IntPtr ph, IntPtr ch, String cn, String wn);
[DllImport(
"User32.dll")]
public static extern bool ShowWindow(IntPtr hWnd, long nCmdShow);
// - 隐藏或显示任务栏 - [End] -
// 隐藏任务栏
IntPtr handle = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null);
ShowWindow(handle,
0);
// 显示任务栏
IntPtr handle = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null);
ShowWindow(handle,
1);

Tags: 隐藏   显示   任务栏   任务