Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Jun 29, 1999

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 = 0
String ls_ShellTaskBarWnd = "Shell_TrayWnd"
String ls_Null
Long ll_HTaskBar

ll_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 = 5
String ls_ShellTaskBarWnd = "Shell_TrayWnd"
String ls_Null
Long ll_HTaskBar

ll_HTaskBar = FindWindowExA( 0, 0, &
   ls_ShellTaskBarWnd, ls_Null )
ShowWindow( ll_HTaskBar, SW_SHOW )
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date