iceman 发表于 2012-7-3 19:16:00

使用 TX Text Control for Windows Forms 创建所见即所得的 BS 程序

所见即所得?对,你没有看错! 顾名思义,就是可以把文档加载到网页中,进行编辑,并且同步到文档和数据库中。更直观的体验可以参考截图:


是不是和 Word 的编辑界面相同呢?下面我们就来分享该用例的实现方法吧!

大体思路为: TX Text Control for Windows Forms 版本控件包装而成的 UseControl,作为 ActiveX 控件添加到 BS 应用程序中。
具体代码可以参见附件,如果你的机器上安装了 TX Text Control 也可以查看随机安装 Demo,路径为:Documents\TX Text Control 17.0.NET for Windows Forms\Samples\ASP.NET\CSharp\Browser\Basics
下面分步讲解怎样正确运行该程序:
1.        运行程序,打开 Step1 页面。我们会发现ActiveX 控件并没有加载:如图所示:


2.        由于 IE 加载 ActiveX 控件的安全策略限制,所以 ActiveX 控件并没有正常加载。我们需要使用命令提示行 VS 2008 Command Prompt 来设置该站点为信任站点,从而可以加载 ActiveX 控件。我们需要使用管理员身份运行VS 2008 Command Prompt 提示行。 操作方法如图:
命令行代码如下:


XP 系统:
caspol -polchgprompt off -q -machine -addgroup 1. -url http://www.yourserver.com/* FullTrust -n "TX Text Control .NET Server" -description "Security settings for TX Text Control .NET Server"


Win7 系统:
caspol -polchgprompt off -q -user -addgroup 1. -url http://www.yourserver.com/* FullTrust -n "TX Text Control .NET Server" -description "Security settings for TX Text Control .NET Server"


3.        重新运行程序我们即可正确加载 ActiveX 控件了,效果如图:


Demo 下载:

shijuanwong 发表于 2013-3-19 11:49:00

win7 系统“caspol -polchgprompt off -q -user -addgroup 1. -url http://www.yourserver.com/* FullTrust -n "TX Text Control .NET Server" -description "Security settings for TX Text Control .NET Server"

这个原因?

iceman 发表于 2013-3-19 14:41:00

回复 2楼shijuanwong的帖子

你好, url 地址不对,请把把图片中 (包括,例如:http://localhost:59903/) 替换为程序运行后的地址。

wscc222 发表于 2013-3-19 15:21:00

回复 3楼iceman的帖子

版主,刚才试验了1把,根据把 连接地址更换了,提示成功,但是运行起来还是这样,IE9

我是那个提问的,重新注册了一个ID

wscc222 发表于 2013-3-19 15:27:00

这个是 执行命名后的截图

wscc222 发表于 2013-3-25 15:48:00

等待版主回复

wscc222 发表于 2013-4-2 10:59:00

<object id="BrowserApp" height="100%" width="100%" classid="http:BrowserBin/templateEditor.dll#templateEditor.tx"
                        name="BrowserApp">
                </object>


http:BrowserBin/templateEditor.dll#templateEditor.tx 这个是厂家的服务器上面的么?    ActiveX 控件始终没有加载

iceman 发表于 2013-4-26 17:50:00

回复 7楼wscc222的帖子

请参考:http://gcdn.grapecity.com/showtopic-8755.html
页: [1]
查看完整版本: 使用 TX Text Control for Windows Forms 创建所见即所得的 BS 程序