Highlighted
Absent Member.
Absent Member.
647 views

Windows Taskbar position

Hi All,

I'm trying to figure out how one determines the Windows task-bar location.

I found that using an ACCEPT statement (like the one below), one can gather information about the user's desktop and determine whether the task-bar is vertical or horizontal.

ACCEPT Terminal-Abilities FROM Terminal-Info

It seems that this can be done by subtracting USABLE-SCREEN-WIDTH from PHYSICAL-SCREEN-WIDTH and if the result is greater than zero, then that means the task-bar is in a vertical position.   A similar test can be done with USABLE-SCREEN-HEIGHT and PHYSICAL-SCREEN-HEIGHT.

But I'm having difficulty in determining what information is available to determine whether the task-bar is on the left or the right, and whether it's on the top or the bottom from the Terminal-Abilities information.

How does one typically determine the position of the task bar on the client workstation using COBOL?

Thanks,

Luis

 

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Windows Taskbar position

The Terminal-Info isn't going to provide that information. Looking at the web, you'd need to use some calls to the Windows API to get this information. winsharp93.wordpress.com/.../
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Windows Taskbar position

Can you lead me to an example of how the Windows API is called from COBOL?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Windows Taskbar position

Can you lead me to an example of how the Windows API is called from COBOL?
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Windows Taskbar position

There is a comprog2.cbl file on community.microfocus.com/.../3974 which has an example. There is also some code in the documentation, search for windows api and you'll find Accessing the Windows API - Calling a Windows API Function from ACUCOBOL-GT
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.