如何找到Windows任务栏的位置及大小? [英] How to find Windows Taskbar location and size?

查看:266
本文介绍了如何找到Windows任务栏的位置及大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建,在系统托盘中运行的应用程序。当单点击图标尝试用户,一个小的形式在屏幕的右下角,也就是右边的系统托盘上面来了。该形式基本上是粘到托盘

I have created an application that runs in the system tray. When the user single- clicks the try icon, a small form comes up in the bottom right corner of the screen, i.e. right above the system tray. The form is basically "sticky" to the tray.

下面是我的问题:我如何完成同样的事情,即使用户有停靠其他地方的任务栏?像在屏幕的顶部或侧面之一?

Here is my question: How do I accomplish the same thing, even if the user has the taskbar docked somewhere else? Like at the top of the screen, or one of the sides?

它不应该是很难的,因为我想我必须做的就是找出的其中,的任务栏。它是在底部,顶部或侧部之一。但是,我找不到任何地方的任何文件,说明如何获得任务栏的位置和地位。

It shouldn't be hard, since I figure all I have to do is find out where the taskbar is. Is it at the bottom, the top, or one of the sides. But I can't find any documentation anywhere, that explains how to get the location and position of the taskbar.

任何人有这个什么想法?

Any one has any idea about this ?

推荐答案

这是一个窗口,所以发现它是HWND,然后拿到窗口坐标。您正在寻找的类名是TrayNotifyWnd。

It's a window, so find it's HWND and then get the window coordinates. The class name you're looking for is "TrayNotifyWnd".

这篇关于如何找到Windows任务栏的位置及大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆