Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to obtain taskbar pos & size

Posted on 1997-05-04
5
Medium Priority
?
210 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
  • 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 40 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

783 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