标签:
---恢复内容开始---
一、ACTIVEX及其相关概念
使用 WindowsFormsHost 元素可将 Windows Forms控件放置到 WPF 元素或页面中。
若要在 Windows Forms控件或窗体中承载 WPF 元素,使用 ElementHost控件
System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();
3.实例化Activex控件 、初始化控件、控件复值到host
txsl1 = new activex();
host.Child = txsl1;
4.添加Host对象到WPF 窗体
this.mainGrid.Children.Add(host);
---恢复内容结束---
WPF 添加ACTIVEX 控件 ——System.Windows.Forms.AxHost+InvalidActiveXStateException异常
标签:
原文地址:http://www.cnblogs.com/cdxy2005/p/5278722.html