Kbase P122453: How to hide and show the Windows TaskBar?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/02/2007 |
|
Status: Unverified
GOAL:
How to hide and show the Windows TaskBar?
GOAL:
How to hide the Windows TaskBar?
GOAL:
How to show the Windows TaskBar?
GOAL:
How to call WIN32 API function: FindWindow?
GOAL:
How to call WIN32 API function: ShowWindow?
FIX:
The following code invokes the WIN32 API function FindWindow and the WIN32 API function: ShowWindow to hide and then to show the Windows Task bar:
/*******************************************************************/
/* Procedure: HowToHideAndShowWindowsTaskbar.p */
/* */
/* Description: HIDE and SHOW the Windows Taskbar */
/* */
/*******************************************************************/
&GLOBAL-DEFINE SW_HIDE 0
&GLOBAL-DEFINE SW_SHOW 5
DEFINE VARIABLE lpClassName AS CHARACTER NO-UNDO.
DEFINE VARIABLE lpWindowName AS CHARACTER NO-UNDO.
DEFINE VARIABLE hWnd AS INTEGER NO-UNDO.
DEFINE VARIABLE iResult AS INTEGER NO-UNDO.
/* Get the Windows Taskbar handle */
ASSIGN
lpClassName = "shell_trayWnd"
lpWindowName = "".
RUN FindWindowA(
INPUT lpClassName,
INPUT lpWindowName,
OUTPUT hWnd
).
/* Hide the Windows Taskbar */
RUN ShowWindow(
INPUT hWnd,
INPUT {&SW_HIDE},
OUTPUT iResult
).
MESSAGE "The Windows Taskbar is now HIDDEN"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* Show the Windows Taskbar */
RUN ShowWindow(
INPUT hWnd,
INPUT {&SW_SHOW},
OUTPUT iResult
).
MESSAGE "The Windows Taskbar is now VISIBLE"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
PROCEDURE FindWindowA EXTERNAL "USER32.DLL":
DEFINE INPUT PARAMETER lpClassName AS CHARACTER..
DEFINE INPUT PARAMETER lpWindowName AS CHARACTER.
DEFINE RETURN PARAMETER hWnd AS LONG.
END.
PROCEDURE ShowWindow EXTERNAL "USER32.DLL":
DEFINE INPUT PARAMETER lpClassName AS LONG.
DEFINE INPUT PARAMETER lpWindowName AS LONG.
DEFINE RETURN PARAMETER hWnd AS LONG.
END.
.