Read the size and location of Windows work columns

Source: Internet
Author: User
Tags reserved

This issue requires a call to the SHAppBarMessage API function, with details as follows:

1. Declaration of the API:

Const ABM_GETTASKBARPOS = &H5
Private Type RECT
 Left As Long
 Top As Long
 Right As Long
 Bottom As Long
End Type
Private Type APPBARDATA
 cbSize As Long
 hWnd As Long
 uCallbackMessage As Long
 uEdge As Long
 rc As RECT
 lParam As Long
End Type

Note: If the above declaration is placed under "General module", add the public reserved word before the Const,

and remove the private reserved word.

2. Program Example:

Dim data as Appbardata

Data.cbsize = Len (data)

Call SHAppBarMessage (Abm_gettaskbarpos, data)

' Data.rc.Left is equal to the left boundary of the work column

' Data.rc.Top is equal to the upper boundary of the work column

' Data.rc.Right is equal to the right boundary of the work column

' Data.rc.Bottom is equal to the bottom boundary of the work column.

Please note that the position and size of the work column shown above are in pixel (pixels).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.