使用来自不同装配的字段 [英] Using fields from different assembly

查看:83
本文介绍了使用来自不同装配的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将信息从一个程序集划分到另一个程序集?

我有一个通用的主机对话框DLL,并使用它以用户控件的形式创建应用程序.但是,宿主对话框DLL是默认的系统菜单,并且没有要传递谁的信息的程序集范围.

例如:

主机对话框是WinForm DLL.它具有用于窗口控件的客户区和非客户区(最小化关闭,系统菜单).

应用是使用添加到项目中的用户控件创建的,每个控件都有一个共同的宿主对话框.

我想将一个通用的About选择添加到系统菜单中,但显示项目程序集而不是宿主对话框DLL中的字段.

希望很清楚

谢谢

How do you scope information from one assembly to another?

I have a generic host dialog DLL and I use that to create applications in the form of user controls. The host dialog DLL however is the default system menu and has no scope of the assembly who''s information I want to pass in.

For example:

Host dialog is a WinForm DLL. It has the client area as well as the non-client area for window controls (minimize close, system menu).

Apps are created using user controls that are addded to projects and each one has the host dialog in common.

I would like to have a generic About selection added to the system menu but display fields from the assembly of the project and not the host dialog DLL.

Hope that was clear

Thanks

推荐答案

我想您正在寻找的是这款产品.签出了源代码并对其进行了很好的解释.

获取可执行程序集名称 [
I guess what you are looking for is this aricle. Checked the source code out and explains it nice.

Get an Executable Assembly Name[^]

Good luck!

Ps. the example only shows that the dll can show you the exe name. If you dive in to this you can get more info of course.


这篇关于使用来自不同装配的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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