开发者

How do applications read assemblies and visualize .NET forms?

开发者 https://www.devze.com 2023-01-12 08:35 出处:网络
Applications like Passolo, Alchemy Catalyst and Lingobit Localizer can read DLLs and vis开发者_StackOverflow中文版ualize .NET controls, such as windows, forms, and dialogs. How might something like th

Applications like Passolo, Alchemy Catalyst and Lingobit Localizer can read DLLs and vis开发者_StackOverflow中文版ualize .NET controls, such as windows, forms, and dialogs. How might something like this be done?


I'm not familiar with those specific applicatios--but they likely use .NET's Reflection metadata.

An assembly can be loaded (or loaded specifically for reflection) and then all Types within that assembly can be inspected. That inspection could consist of finding types which inherit from a WinForms Control, or perhaps which inherit from something defined in System.Windows.Forms.


I can imagine the basic idea is to search the dlls via reflection for classes derived from Form or UserControl and instantiate them. Then render the result on your own surface.

0

精彩评论

暂无评论...
验证码 换一张
取 消