Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:31:06+00:00 2026-05-23T13:31:06+00:00

I need to get the width and height of the taskbar. Also I need

  • 0

I need to get the width and height of the taskbar. Also I need the position of the taskbar. How can I get this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:31:07+00:00Added an answer on May 23, 2026 at 1:31 pm

    Well, since this question is composed on how to get the task bar coordinates I’ve decided to post another version of how to achieve this by using SHAppBarMessage function with ABM_GETTASKBARPOS message parameter.

    I’ve posted two versions; one with and one without given task bar handle. Note that if you are sending ABM_GETTASKBARPOS message you should specify the hWnd member in the APPBARDATA structure as it’s mentioned in the ABM_GETTASKBARPOS description. So the first version is safe for this case. The second one works though but it’s formally wrong.

    uses ShellAPI;
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      Data: TAppBarData;
    begin
      Data.hWnd := FindWindow('Shell_TrayWnd', nil);
      Data.cbSize := SizeOf(TAppBarData);
    
      if Data.hWnd <> 0 then
        if SHAppBarMessage(ABM_GETTASKBARPOS, Data) = 1 then
          ShowMessage(
                          'Left: ' + IntToStr(Data.rc.Left) + 'px ; ' +
                          'Top: ' + IntToStr(Data.rc.Top) + 'px ; ' +
                          'Width: ' + IntToStr(Data.rc.Right - Data.rc.Left) + 'px ; ' +
                          'Height: ' + IntToStr(Data.rc.Bottom - Data.rc.Top) + 'px'
                      );
    end;
    

    Note that this version (where the TAppBarData.hWnd member is not specified) works though but it’s wrong according to the MSDN.

    procedure TForm1.Button2Click(Sender: TObject);
    var
      Data: TAppBarData;
    begin
      Data.cbSize := SizeOf(TAppBarData);
    
      if SHAppBarMessage(ABM_GETTASKBARPOS, Data) = 1 then
        ShowMessage(
                        'Left: ' + IntToStr(Data.rc.Left) + 'px ; ' +
                        'Top: ' + IntToStr(Data.rc.Top) + 'px ; ' +
                        'Width: ' + IntToStr(Data.rc.Right - Data.rc.Left) + 'px ; ' +
                        'Height: ' + IntToStr(Data.rc.Bottom - Data.rc.Top) + 'px'
                    );
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get the actual width and height of the shareddiv before populating
How can I get the width and height of the current instance of carrierwave?
I need to get the width and height of a .mov-file with php. How
I need to get the body element height and width, when i resize the
I need to get the width and height of iPhone/iPad using MonoTouch. How to
I need to get the window height and width of the browser using ATK4,
I need to get height and width of my View and I have followed
Does anyone know how to get the width and height of text in a
I need to get this Jquery box to appear on page load. Right now
i want to to get the height/width of an image inside a hidden div-containter,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.