首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

获取EXE文件中所有窗体或得到程序中所有的窗体解决方案

2012-01-31 
获取EXE文件中所有窗体或得到程序中所有的窗体有没有方法得到一个EXE文件中所有的窗体信息[解决办法]C# co

获取EXE文件中所有窗体或得到程序中所有的窗体
有没有方法得到一个EXE文件中所有的窗体信息

[解决办法]

C# code
        private void Form1_Load(object sender, EventArgs e)        {            string strPass = @"E:\MyProgram\TestPro\API\TestLog4Net.exe";            Assembly assebly = Assembly.LoadFrom(strPass);            Module module = assebly.ManifestModule;            Type[] types = m.GetTypes();            Type tpForm = typeof(Form);            foreach (Type type in types)            {                if (type.IsSubclassOf(tpForm))                {                    this.textBox1.Text = type.FullName;                }            }                    } 

热点排行