任务栏的显示与隐藏

  
// - 隐藏或显示任务栏 - [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 );

你可能感兴趣的:(显示)