Hiding Taskbar

Question:
I was wondering how to hide the taskbar in NT/95?

Answer:
To hide the task bar you will need to declare two API calls. These two API calls will locate the TaskBar window handle and then alter the state of the window.

Declare the API calls as follows:

Function long FindWindowExA &   ( long hWnd, long hWndChild, &  ref string lpszClassName, &  ref string lpszWindow) library 'user32'Function long ShowWindow &  (long hWnd, long nCmdShow ) library 'user32'

Then add the following code to your PowerBuilder script:

Constant Long SW_HIDE = 0String ls_ShellTaskBarWnd = "Shell_TrayWnd"String ls_NullLong ll_HTaskBarll_HTaskBar = FindWindowExA( 0, 0, &  ls_ShellTaskBarWnd, ls_Null )ShowWindow( ll_HTaskBar, SW_HIDE )

The same code can be used to redisplay the taskbar when you are finished:

Constant Long SW_SHOW = 5String ls_ShellTaskBarWnd = "Shell_TrayWnd"String ls_NullLong ll_HTaskBarll_HTaskBar = FindWindowExA( 0, 0, &   ls_ShellTaskBarWnd, ls_Null )ShowWindow( ll_HTaskBar, SW_SHOW )
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: