WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Start Menu - TaskBar

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Determine Horizontal or Vertical Position of Taskbar

Keywords: 

Question:

I have developed a screen combining boxes and a dialog box. Looks very nice. Trouble is, if the taskbar is moved around, top left for right, the alignment is off between the box and dialog box.

Does anyone know how to determine the postion of the taskbar. I have searched high and low, used a registry monitor program, nothing.

Answer:

I think the taskbar position is saved in the ShellIconCache file in the windows directory. But it is a binary file and I have no idea on how to read it.

In cases like this I usually just make a smaller screen so that the taskbar could be anywhere and my screen is still visible.

Here's another idea:

        WinMetrics(0 ) = 1024 Width of screen in pixels
        WinMetrics(1 ) = 768 Height of screen in pixels
With the task bar at the top/bottom:
        WinMetrics(16) = 1024 Width of full screen window
        WinMetrics(17) = 715 Height of full screen window
With the task bar at the side:
        WinMetrics(16) = 964 Width of full screen window
        WinMetrics(17) = 746 Height of full screen window
So with WIL's functions you can at least tell whether the task bar is oriented horizontally or vertically.
Article ID:   W13148
Filename:   Determine Taskbar Location.txt
File Created: 1999:04:15:16:52:04
Last Updated: 1999:04:15:16:52:04