壳牌计划 [英] Shell Program

查看:86
本文介绍了壳牌计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经问了一次并得到了很好的回应,但这并不是我们需要的b $ b。我正在重新阐明我的要求。我想开发一个需要用户登录的

shell程序。当他们登录时,我会检索他们可以加载的所有程序。
当他们点击一个程序来加载
时,我想在shell程序中加载程序并从shell程序中运行它。我的shell表单上有一个拆分容器控件。在

左边我列出了可以运行的程序,在右侧窗格中,我想加载

程序。当我使用以下代码时:


Dim extAssembly As System.Reflection.Assembly =

System.Reflection.Assembly.LoadFrom(" D:\ testload \\\ estLoad\TestLoad\bin\Debug\testload.exe")

Dim extForm As Form = \\ textAssembly.CreateInstance(" TestLoad.form1",True )


Me.AddOwnedForm(extForm)


extForm.Show()


加载该程序,但在一个单独的窗口。我希望能够在程序中加入程序的一些属性(程序

properties.cls)设置

一些属性,并与传递值的表单进行通信$。
这可能是反射吗?还是有更好的方法来做到这一点。

真的,我想做的是一种snapin类型的架构

,因为我们添加新的程序,他们可以抢入到shell并运行和

与shell程序通信。任何关于此的代码或教程都将是非常好的。谢谢。


John

I asked once before and got a good response, but it was not quite what we
needed. I am reposting clarifying my requirements. I want to develop a
shell program that requires the user to login. When they login, I will
retrieve all the programs they can load. When they click on a program to
load, I want to load the program in the shell program and run it from within
the shell program. I have a split container control on my shell form. In
the left I list the programs that can run, in the right pane, I want to load
the program. When I use the following code:

Dim extAssembly As System.Reflection.Assembly =
System.Reflection.Assembly.LoadFrom("D:\testload\T estLoad\TestLoad\bin\Debug\testload.exe")

Dim extForm As Form = extAssembly.CreateInstance("TestLoad.form1", True)

Me.AddOwnedForm(extForm)

extForm.Show()

It loads the program but in a seperate window. I want to be able to set
some properties in the program in a class the progam has loaded (program
properties.cls) and communciate with the form passing values back and forth.
Is this possible with reflection? or is there a better way to do this.
Really, what I am trying to do is a sort of snapin type of architecture that
as we add new programs they can "snap in" to the shell and run and
communicate with the shell program. Any code or tutorial on this would be
great. Thanks.

John

推荐答案

更多信息。我正在尝试创建一个像MMC这样的应用程序,允许我使用快照按钮。新的应用。


John

" John Wright" < RI ********** @ notmail.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP14.phx.gbl ...
More info. I am trying to create an application like MMC that would allow
me to "snap" new appliations in.

John
"John Wright" <ri**********@notmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
我问过之前曾经得到过很好的回应,但这并不是我们所需要的。我正在重新阐明我的要求。我想开发一个需要用户登录的shell程序。当他们登录时,我将检索他们可以加载的所有程序。当他们点击一个程序来加载时,我想在shell程序中加载程序并在shell程序中从
运行它。我的shell
表单上有一个拆分容器控件。在左侧,我列出了可以运行的程序,在右侧窗格中,我想要加载程序。当我使用以下代码时:

Dim extAssembly As System.Reflection.Assembly =
System.Reflection.Assembly.LoadFrom(" D:\ testload \T estLoad\TestLoad \\\\Debug\testload.exe")

Dim extForm As Form = extAssembly.CreateInstance(" TestLoad.form1",True)

Me.AddOwnedForm (extForm)

extForm.Show()

它加载程序但是在一个单独的窗口中。我希望能够在程序中加载程序(程序
properties.cls)的程序中设置一些属性,并与返回值的表单进行通信。这可能与反思有关吗?还是有更好的方法来做这个。真的,我想要做的是一种snapin类型的架构,当我们添加他们可以抢购的新程序时。到shell
并运行并与shell程序通信。关于
的任何代码或教程都会很棒。谢谢。

约翰
I asked once before and got a good response, but it was not quite what we
needed. I am reposting clarifying my requirements. I want to develop a
shell program that requires the user to login. When they login, I will
retrieve all the programs they can load. When they click on a program to
load, I want to load the program in the shell program and run it from
within the shell program. I have a split container control on my shell
form. In the left I list the programs that can run, in the right pane, I
want to load the program. When I use the following code:

Dim extAssembly As System.Reflection.Assembly =
System.Reflection.Assembly.LoadFrom("D:\testload\T estLoad\TestLoad\bin\Debug\testload.exe")

Dim extForm As Form = extAssembly.CreateInstance("TestLoad.form1", True)

Me.AddOwnedForm(extForm)

extForm.Show()

It loads the program but in a seperate window. I want to be able to set
some properties in the program in a class the progam has loaded (program
properties.cls) and communciate with the form passing values back and
forth. Is this possible with reflection? or is there a better way to do
this. Really, what I am trying to do is a sort of snapin type of
architecture that as we add new programs they can "snap in" to the shell
and run and communicate with the shell program. Any code or tutorial on
this would be great. Thanks.

John



这篇关于壳牌计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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