摘要: 1. 新建项目,类型 Windows Forms Control Library2. 删除默认创建的 User Control,自己添加一个,名称 InfoViewer3. Tools --> Create Guid,复制4. 修改 InfoViewer.cs,代码如下 [Guid("B3BCD23C-53EE-4661-83E0-559E5D022514")]public partial class InfoViewer : UserControl{ public InfoViewer() { InitializeComponent(); ... 阅读全文
posted @ 2013-03-02 15:33 踏歌长行 阅读(227) 评论(0) 推荐(0) 编辑
摘要: ActiveX 控件中调用 JavaScript 方法1. 添加接口 【IOleContainer】,代码如下[ComImport, Guid("0000011B-0000-0000-C000-000000000046"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]public interface IOleContainer{ void EnumObjects([In, MarshalAs(UnmanagedType.U4)] int grfFlags, [Out, MarshalAs(Unm 阅读全文
posted @ 2013-03-02 11:24 踏歌长行 阅读(317) 评论(0) 推荐(0) 编辑