Solved

How to obtain taskbar pos & size

Posted on 1997-05-04
5
201 Views
Last Modified: 2010-04-06
The screen object provides full screen width & height dimensions that do not take into account the position and size of the Win95 taskbar.

How do I find out about the positon and size of the Win95 taskbar ?

I've been looking in the Win32 help file for a few days now and can't find the answer.
0
Comment
Question by:mlanza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Author Comment

by:mlanza
ID: 1335886
Edited text of question
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1335887
I seem to remember that there is a handle for the desktop, which
should take into account the taskbar, and subtract it from the screens size. I'll look into it and get back to you...
0
 

Accepted Solution

by:
lkovac earned 20 total points
ID: 1335888
var
  r: TRect;
  h: hWnd;
...
  h := FindWindow("TrayNotifyWnd", "");
  if h <> 0 then
    GetWindowRect(h, r);
0
 

Author Comment

by:mlanza
ID: 1335889
The answer is incorrect, FindWindow('TrayNotifyWnd', Nil) always returns no window handle.

Please also note that I am after the TaskBar, not just the Notify Icon area.

0
 

Expert Comment

by:lkovac
ID: 1335890
Sorry, here is the correct, tested code:

var
  r: TRect;
  h: hWnd;
begin
  h := FindWindow('Shell_TrayWnd', '');
  if h <> 0 then
    GetWindowRect(h, r);
end;

0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 22 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question