如何使用另一个exe从exe打开一个表单? [英] How to open one form from an exe using another exe?
本文介绍了如何使用另一个exe从exe打开一个表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为Project1的项目,它有一个名为form1的表单。我有另一个名为Project2的项目,它也有一个名为form2的表单,这个表单上有一个命令按钮。现在,当我按下命令按钮时,我希望显示,加载Project1中的form1或其他任何内容。
这可能吗?
I have a project named Project1, it has a form named form1. I have another project named Project2, it too has a form named form2, there is a command button on this form. Now when I press the command button, I want the form1 from Project1 to be shown, loaded or whatever.
Is this possible?
推荐答案
由于您可以控制这两个应用程序,您可以通过IPC
机制( Google是你的朋友 [ ^ ])。
更基本的方法是使用SendKeys
( Google又是你的朋友 [ ^ ])。
Since you have control of both the applications, you could make them collaborate via aIPC
mechanism (Google is your friend[^]).
A more rudimental method would be using theSendKeys
(Google is, again, your friend[^]).
这篇关于如何使用另一个exe从exe打开一个表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文