private const int SW_HIDE = 0; // hide
private const int SW_RESTORE = 9; // display
/// <Summary> /// Get the form handler function /// </ Summary> /// <param name = "the lpClassName"> window class name </ param> /// <param name = "lpWindowName" > window title name </ param> /// <returns> returns a handle </ returns> [the DllImport ( " User32.dll " , the EntryPoint = " the FindWindow " , the SetLastError = to true )] public static extern IntPtr the FindWindow ( String the lpClassName, String lpWindowName);
/// <the Summary> /// taskbar && Start Menu /// </ the Summary> public static void ShowTask () { // display the taskbar ShowWindow (( int ) FindWindow ( " Shell_TrayWnd " , null ), SW_RESTORE) ; // display system start menu bar button ShowWindow (( int ) FindWindow ( " the button " , null ), SW_RESTORE); } /// <the Summary> /// hide the taskbar && start menu /// </ the Summary> public static void HideTask () { // hide the taskbar ShowWindow (( int ) FindWindow ( " Shell_TrayWnd " , null ), SW_HIDE); // hide the menu bar button start system ShowWindow (( int ) FindWindow ( " the Button " , null ) , SW_HIDE); }