DSOFramer控件使用注意事项
1.引用dll==>AxInterop.DSOFramer.dll
==>Interop.DSOFramer.dll
==>WindowsFormsIntegration
==>System.Windows.Forms
2.设置嵌入互操作类型为False
引用-->引用的dll(AxInterop.DSOFramer.dll,Interop.DSOFramer.dll)-->属性-->找到嵌入互操作类型选成False
3.设置项目生成平台x86(不然会报错)
4.xaml代码:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Height="30" Width="80" x:Name="btn_Open" Click="btn_Open_Click"/>
<WindowsFormsHost Grid.Row="1" x:Name="wfHost" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<dsoFramer:AxFramerControl x:Name="Framer" />
</WindowsFormsHost>
</Grid>
cs代码
设置属性:
Framer.Menubar = false;//
Framer.Titlebar = false;// 隐藏列头
Framer.Toolbars = false;// 隐藏工具栏
设置打开方法:
private void SetDocment(string filePath)
{
Framer.FrameHookPolicy = dsoFrameHookPolicy.dsoSetOnFirstOpen;
if (String.IsNullOrEmpty(filePath))
return;
try
{
Framer.Select();
Framer.Open(filePath);
}
catch (Exception)
{
MessageBox.Show("打开失败");
} this.Dispatcher.BeginInvoke(DispatcherPriority.Background, (DispatcherOperationCallback)delegate(object o)
{
if (Framer != null)
{
Framer.Activate();
}
return null;
}, null);
Framer.Activate();
}
private void btn_Open_Click(object sender, RoutedEventArgs e)
{
SetDocment(AppDomain.CurrentDomain.BaseDirectory + "2016-05-20估值表对账结果.xlsx");
}
DSOFramer控件使用注意事项的更多相关文章
- dsoframer控件学习小结(打开WORD,EXCEL等文件)
根据自己对dsoframer控件的学习,想把dsoframer控件进行简单的包装为C#的usercontrol,大体需要作如下:(创建windows的usercontrol的步骤就不再说了...)我们 ...
- dsoframer控件在64系统上使用问题小汇总
由于工作中需要,我接触了dsoframer控件,我办公电脑是64系统,在使用时,总是报没有注册类错误.我很是奇怪,dsoframer.ocx控件我都注册过的呀.然后在网上查阅了许多相关资料.悲哀的是, ...
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题 .
使用如下属性设置: axFramerControl.ActivationPolicy = DSOFramer.dsoActivationPolicy.dsoKeepUIActiveOnAppDeact ...
- 【VS开发】关于在CFormView中实现CListCtrl控件的注意事项
[VS开发]关于在CFormView中实现CListCtrl控件的注意事项 标签(空格分隔): [VS开发] 今天调试中发现了一项非常令人恼怒的事情,本来早都知道在CFormView中没有了像在对话框 ...
- DSOFramer 控件修改成功
1.Html电子印章.手写签名系统演示:http://www.dianju.com.cn/video.htm 在线试用: http://www.dianju.com.cn/websignpiaoju/ ...
- win7 64位在线编辑dsoframer控件的安装和使用配置
经历了两天的折磨,查阅了网上的资料,按网上的操作试了n种方法结果还是不行,开始以为是dsoframer 是32位控件问题,结果不是(经历了更改解决方案cpu,发布基于x86的网站:以为是操作系统问题, ...
- DSOFramer 控件(转)
1.Html电子印章.手写签名系统演示:http://www.dianju.com.cn/video.htm在线试用:http://www.dianju.com.cn/websignpiaoju/ht ...
- dsoframer控件注册,解注册和检查注册情况
public class DsoframerHelper { private static string dsoframerPath = System.Windows.Forms.Applicat ...
- iOS开发中的错误整理,关于用绑定Tag取控件的注意事项,有时候不绑定也是个错!
如图:红色框中是个自定义的导航工具条titlesView(没有绑定Tag),工具条中有五个按钮(按钮绑定了Tag)以及一个红色的指示器indicatorView(没有绑定Tag),下面的蓝色是可以滚动 ...
随机推荐
- protobuf json xml比较
1 protobuf/xml/json对比 从数据的存储格式的角度进行对比 假如要存储一个键值对: {price:150} 1.1 protobuf的表示方式 message Test { opti ...
- JSDuck 安装---mac
1. 如果你已经安装了xcode,安装Xcode command line tools,在终端输入 xcode-select --install 2.install RVM \curl -sSL h ...
- PAT 甲级 1128. N Queens Puzzle (20) 【STL】
题目链接 https://www.patest.cn/contests/pat-a-practise/1128 思路 可以 对每一个皇后 都判断一下 它的 行,列 ,左右对角线上 有没有皇后 深搜解决 ...
- PHP echo() 函数
实例 输出文本: <?php echo "Hello world!"; ?> 定义和用法 echo() 函数输出一个或多个字符串. 注释:echo() 函数实际不是一个 ...
- 【字符串题目】poj 3096 Surprising Strings
Surprising Strings Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6193 Accepted: 403 ...
- JMS消息可靠机制
ActiveMQ消息签收机制: 客戶端成功接收一条消息的标志是一条消息被签收,成功应答. 消息的签收情形分两种: 1.带事务的session 如果session带有事务,并且事务成功提交,则消息被自动 ...
- python根据圆的参数方程求圆上任意一点的坐标
from math import cos, sin,pi x0,y0=0,0 r=4.0 angle=-25 x1 = x0 + r * cos(angle * pi / 180) y1 = y0 + ...
- C#多线程编程介绍——使用thread、threadpool、timer
C#多线程编程介绍——使用thread.threadpool.timer 在system.threading 命名空间提供一些使得能进行多线程编程的类和接口,其中线程的创建有以下三种方法:thread ...
- T60
The smooth contour of the sculpture is wonderful.Her commitment to a great cause degenerated from a ...
- 002-CSS基础
1 CSS和文档 CSS 层叠样式表 元素 每个元素都会生成一个框(box) 元素 = 替换元素 + 非替换元素 替换元素 显示的内容是元素内的某个属性而不是元素本身, 如img 非替换元素 大部分类 ...