使用C#发送鼠标点击一个按钮在任务栏 [英] Sending a mouse click to a button in the taskbar using C#

查看:127
本文介绍了使用C#发送鼠标点击一个按钮在任务栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我目前工作的一个应用程序,要求是把外部应用程序的窗口到前台。使Win32 API调用,如BringWindowToTop和SetForeground窗不工作的所有时间。这是由于在Windows XP中的一些限制。我想这样做的,而不是被发送模拟鼠标单击任务栏而我希望会带来窗口前面的窗口的按钮。有谁知道这是可能的?

In an application that I am currently working on, a requirement is to bring a window of an external application to the foreground. Making Win32 API calls such as BringWindowToTop and SetForeground window do not work all the time. This is due to some restrictions within Windows XP. What I would like to do instead is send simulate a mouse click the window's button on the taskbar which I am hoping will bring the window to the front. Does anyone know how this is possible?

推荐答案

退房的部分,在 HTTP://www.$c$cproject.com/KB/dialog/dlgboxtricks.aspx ,因为这正是你所需要的。我不会在任务栏的路线为任务栏可以隐藏或根本不存在。

Check out the section "How to steal focus on 2K/XP" at http://www.codeproject.com/KB/dialog/dlgboxtricks.aspx, as this is exactly what you need. I wouldn't go the taskbar route as the taskbar could be hidden or simply not there.

这篇关于使用C#发送鼠标点击一个按钮在任务栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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