打开一个exe,然后单击按钮 [英] open an exe and click the button
本文介绍了打开一个exe,然后单击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想打开一个exe,然后单击按钮以从exe应用打开文件.
我知道我可以打电话:
System.Diagnostics.Process.Start(路径名");
如何在刚打开的应用程序上调用单击按钮"的过程?
谢谢!
Hello,
I would like to open an exe and click the button to open the file from an exe app.
I know I can call:
System.Diagnostics.Process.Start("pathname");
how can I call the process to "click the button" on the application that I just open?
Thanks!
推荐答案
您需要从user32.dll P/调用某些功能.
这是实现它的示例:
http://stackoverflow.com/questions/5206223/press-button-in-another- Applications-window [ ^ ]
Pinvoke.net提供了有关User32.dll(和许多其他)功能以及如何使用它们的有用信息.
http://www.pinvoke.net/default.aspx/user32.FindWindowEx [ ^ ]
同样在Windows Dev Center中:
http://msdn.microsoft.com/zh-我们/library/windows/desktop/ms633500%28v=vs.85%29.aspx [ http://msdn.microsoft.com/zh-我们/library/windows/desktop/ms644950%28v=vs.85%29.aspx [ http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms644927%28v = vs.85%29.aspx#system_defined [
Hi,
you need to P/Invoke some functions from user32.dll.
Here''s a example of how to achieve it:
http://stackoverflow.com/questions/5206223/press-button-in-another-applications-window[^]
Pinvoke.net provides useful informations about User32.dll (and many other) functions, and how to use them.
http://www.pinvoke.net/default.aspx/user32.FindWindowEx[^]
Also at Windows Dev Center:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633500%28v=vs.85%29.aspx[^]
Most important function isSendMessage
, which sends Messages (Commands) to your Window:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950%28v=vs.85%29.aspx[^]
Available Messages you can send to your Window:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644927%28v=vs.85%29.aspx#system_defined[^]
With Best Regards
这篇关于打开一个exe,然后单击按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文