Solved

How to obtain taskbar pos & size

Posted on 1997-05-04
5
192 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Virtuailstring tree compare node issue 14 127
Delphi XE10 Round Image 2 161
Not able to call Delphi XE10 dll function from Delphi 6.0 4 37
Firemonkey allowing RTL on android 6 47
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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