如何在其他应用程序中打开1个应用程序的形式? [英] How to open the form of 1 application in other application?

查看:90
本文介绍了如何在其他应用程序中打开1个应用程序的形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在其他应用程序中打开1个应用程序的表单?



我尝试了什么:



应用程序A运行时,它将调用DLL X



应用程序B运行时,它将调用DLL Y at运行时执行任务→我想在应用程序A中显示formLogin,可以这样做吗?



这可能吗?

解决方案

你不可能像你描述的那样。 .DLL独立于所有其他进程加载到每个进程中。没有实例有其他存在的线索。



您必须实现某种形式的进程间通信(IPC),例如命名管道,然后应用程序可以彼此交谈并来回发送命令和数据。你必须在你的应用程序A中实现一个服务器,它接受你定义的任何命令并执行它们,比如弹出你的表单。



这不是一件容易的事。实施

How to open the form of 1 application in other application?

What I have tried:

Application A when runs, it'll call a DLL X

Application B when runs, it'll call a DLL Y at runtime to perform tasks → I would like display formLogin inside Application A, can do this?

Is that possible?

解决方案

It's not possible like you described. The .DLL is loaded into each process independently of all others. No instance has a clue the others exist.

You'd have to implement some form of interprocess communication (IPC), such as named pipes, and the apps could then talk to each other and send commands and data back and forth. You'd have to implement a server in your Application A that accepts whatever commands you define and executes them, such as popping up your form.

This is NOT trivial to implement.


这篇关于如何在其他应用程序中打开1个应用程序的形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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