模拟鼠标单击最小化的窗口 [英] Simulate mouse click on a minimized window
问题描述
我目前正在C#中编写一个应用程序,它将识别屏幕上的某些模式,并移动到鼠标点击它。目前,应用程序需要具有焦点和鼠标光标移动,因此计算机在程序运行时不可用。
我想模拟鼠标点击一个窗口,但实际上没有移动鼠标在屏幕上。
我的目标是能够模拟鼠标点击最小化的应用程序。
I am currently writing an application in C# that will recognize certain patterns on the screen and move to mouse to click on it. Currently, the application needs to have the focus and the mouse cursor moves, so the computer is unusable while the program is running. I would like to simulate a mouse click on a window but without actually moving the mouse on the screen. My goal would be to be able to simulate mouse click on a application that is minimized. Would that be easy to make in C#?
推荐答案
您应该阅读关于从.NET使用Windows API(PInvoke )。开始于这些:
You should read about using Windows API from .NET (PInvoke). Start with these:
http://msdn.microsoft.com/en-us/library/bb775985(v = vs.85).aspx
http://www.codeguru.com/forum/showthread.php?t = 427934
这篇关于模拟鼠标单击最小化的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!