在MDI容器中作为孩子的独立exe [英] a stand alone exe as a child in an MDI container

查看:54
本文介绍了在MDI容器中作为孩子的独立exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我想知道在C#[App_A]中创建的编译EXE是否有任何方式,可以由另一个人调用
EXE [App_MDI]。

App_MDI应该是App_A的容器。

(简而言之App_M应该是App_MDI父应用程序中的子窗体)


注意:App_A只包含一个表格。


提前致谢。


Sajid Saeed

Hi All,

I want to know if there is any way a complied EXE created in C# [App_A], can
be called by another EXE [App_MDI].
The App_MDI, should be the container for the App_A.
(In short App_A should be a child form in the App_MDI parent application)

note: App_A will only contain one form.

Thanks in Advance.

Sajid Saeed

推荐答案

Sajid,


我不认为有。您可以尝试将

窗口的父级设置为MDI父级,但我对是否可以使用

表示严重怀疑。另外,调用另一个EXE将导致它进入另一个

进程,它有自己的消息循环等等。


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- ni ************** @ exisconsulting.com


Sajid Saeed <喜****** @ hotmail.com>写在消息

新闻:uB ************** @ TK2MSFTNGP11.phx.gbl ...
Sajid,

I don''t think that there is. You could try and set the parent of the
window to be the MDI parent, but I have serious doubts as to whether or not
that will work. Also, calling the other EXE will cause it to be in another
process, it has its own message loop, etc, etc.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Sajid Saeed" <hi******@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP11.phx.gbl...
大家好,

我想知道在C#[App_A]中是否有任何编译的EXE,
可以被另一个EXE [App_MDI]调用。
App_MDI应该是容器对于App_A。
(简而言之,App_M应该是App_MDI父应用程序中的子表单)

注意:App_A只包含一个表单。

谢谢提前。

Sajid Saeed
Hi All,

I want to know if there is any way a complied EXE created in C# [App_A], can be called by another EXE [App_MDI].
The App_MDI, should be the container for the App_A.
(In short App_A should be a child form in the App_MDI parent application)

note: App_A will only contain one form.

Thanks in Advance.

Sajid Saeed






谢谢对于你的评论,所以看起来,独立的exe'不会是MDI的一部分



我期待这个答案...


无论如何,现在可以在两个单独的

exe'之间共享一个程序集,这样可以说如果父应用程序关闭了,它会强制

其他exe也是如此。


再次感谢


Sajid Saeed。 。


Nicholas Paldino [.NET / C#MVP]" < NI ************** @ exisconsulting.com>在消息新闻中写了

:uU ************** @ tk2msftngp13.phx.gbl ...
Hi,

Thanks for ur comments, so it looks like, stand alone exe''s will not be part
of the MDI.
I was expecting this answer...

Now is there anyway, where an assembly can be shared between two seperate
exe''s, so that lets say if the parent application is closed, it forces the
other exe to clase as well.

Thanks once again

Sajid Saeed..

"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:uU**************@tk2msftngp13.phx.gbl...
Sajid,
我不认为有。您可以尝试将
窗口的父级设置为MDI父级,但我对是否可以使用或
不会起作用存在严重怀疑。另外,调用另一个EXE将导致它在
另一个进程中,它有自己的消息循环等等。

希望这会有所帮助。

-
- Nicholas Paldino [.NET / C#MVP]
- ni **************@exisconsulting.com





你能否真正展示一下如何实现这一目标的代码片段。


谢谢


Sajid Saeed

" Chris Capel" < CH *** @ nowhere.com>在消息中写道

新闻:#F ************** @ TK2MSFTNGP10.phx.gbl ...
Hi,

Could you actually show a code snippet on how this could actually be done.

Thanks

Sajid Saeed

"Chris Capel" <ch***@nowhere.com> wrote in message
news:#F**************@TK2MSFTNGP10.phx.gbl...
实际上,有一种方式,我相信。你无法在编译时引用该文件。您可以使用Assembly.Load或LoadFrom在运行时加载它,然后使用反射来获取表单的类型,并使用Activator.CreateInstance来创建该类型的实例。当然,EXE中的
表单必须是正确的类型和一切。但那个
应该可以解决问题。我使用这种策略从存根中运行
系统中的所有应用程序,从应用程序
服务器下载文件,以简化部署。由于它们是EXE,如果需要它们可以单独运行,但是你可以引用它们(尽管很笨拙)就好像它们是库。这可能对你有用。

希望这会有所帮助。

Chris

Sajid Saeed <喜****** @ hotmail.com>在消息中写道
新闻:uB ************** @ TK2MSFTNGP11.phx.gbl ...
Actually, there is a way, I believe. You just can''t reference the file at
compile time. You load it at runtime using Assembly.Load or LoadFrom, and
then you use reflection to get the type of the form, and
Activator.CreateInstance to create an instance of the type. Of course, the
form in your EXE has to be of the right type and everything. But that should do the trick. I use this sort of tactic to run all of the applications in my system from a stub, with the files downloaded off of an application server, to simplify deployment. Since they''re EXEs, they can be run standalone if
needed, but you can reference them (albeit awkwardly) as if they were
libraries. This will probably work for you.

Hope this helps.

Chris

"Sajid Saeed" <hi******@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP11.phx.gbl...
大家好,

我想知道在C#[App_A]中创建的编译EXE是否有任何方式,
Hi All,

I want to know if there is any way a complied EXE created in C# [App_A],


可以由另一个EXE [App_MDI]调用


can


App_MDI应该是App_A的容器。
(简而言之App_A应该是App_MDI父级
应用程序中的子表单)
注意:App_A只包含一个表单。 />
提前致谢。

Sajid Saeed
be called by another EXE [App_MDI].
The App_MDI, should be the container for the App_A.
(In short App_A should be a child form in the App_MDI parent application)
note: App_A will only contain one form.

Thanks in Advance.

Sajid Saeed




这篇关于在MDI容器中作为孩子的独立exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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