How do applications read assemblies and visualize .NET forms?
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.
精彩评论