简体   繁体   English

VB6 ActiveX控件的替代方法-基于Silverlight或.NET的ActiveX控件

[英]Alternative to VB6 ActiveX Controls - Silverlight or .NET based ActiveX Controls

I have a web application which extensively uses Windows Common Controls ActiveX controls for User Interface. 我有一个Web应用程序,它广泛使用Windows公共控件ActiveX控件作为用户界面。 These mainly include Listview, Treeview, Common Dialog etc. With these controls I get very good performance in load times and also these controls provides very good communication with JavaScript. 这些主要包括Listview,Treeview,Common Dialog等。通过这些控件,我在加载时间上获得了很好的性能,并且这些控件还提供了与JavaScript的良好通信。

Recently I enabled supporting Unicode characters in the application and I started facing problem with these controls where they are simply rendering these Unicode characters as '???'. 最近,我在应用程序中启用了对Unicode字符的支持,并且开始遇到这些控件的问题,这些控件只是将这些Unicode字符呈现为'???'。 This is specially happening with double by characters (eg Chinese, Japanese etc...). 这种情况特别发生在两个字符(例如中文,日语等)之间。

I would like to replace these controls with something new and more powerful. 我想用新的更强大的功能替换这些控件。 Certainly I don't want to go with .NET Server Controls or any Client base Script controls like ExtJS or DhtmlX since the performance will never be same (performance with loading 15000 rows using ActiveX where data is passed through JavaScript row by row is pretty fast). 当然,我不想使用.NET Server控件或任何基于Client的脚本脚本控件(例如ExtJS或DhtmlX),因为性能将永远不一样(使用ActiveX加载15000行(其中数据逐行通过JavaScript传递的性能非常快) )。

I would like to know what alternative I have if I want to replace these controls. 我想知道如果要替换这些控件,我还有什么选择。 Is it Silverlight or .NET based ActiveX controls? 是基于Silverlight还是基于.NET的ActiveX控件? My client browser will always be IE7+ and having Silverlight or .NET framework on client is not a problem. 我的客户端浏览器将始终是IE7 +,并且客户端上具有Silverlight或.NET框架不是问题。 However the main criteria is that usage of these controls and communication with JavaScript for loading these controls should as close to as we currently do with VB6 ActiveX controls. 但是,主要标准是这些控件的使用以及与JavaScript的通信来加载这些控件应与我们当前对VB6 ActiveX控件所做的接近。

If anyone can suggest any vendor who provides these controls that would be great. 如果有人可以建议任何提供这些控件的供应商,那就太好了。

Thanks in advance. 提前致谢。

While there are vendors that sell Silverlight controls that you can use you are not able to directly use these controls in your HTML page. 虽然有一些供应商可以出售您使用的Silverlight控件,但您无法直接在HTML页面中使用这些控件。 Instead you will have to create a Silverlight application that could be a simple wrapper around a control. 相反,您将必须创建一个Silverlight应用程序,该应用程序可以是控件的简单包装。 It is possible for the Silverlight application to interact with the browser object model and vice versa using JavaScript to interact with the Silverlight application. Silverlight应用程序有可能使用JavaScript与Silverlight应用程序进行交互,从而与浏览器对象模型进行交互,反之亦然。 However, if performance is important you should probably let the Silverlight application interact directly with the web server. 但是,如果性能很重要,则可能应该让Silverlight应用程序直接与Web服务器进行交互。

I want to mention that Silverlight doesn't require the .NET framework to be installed. 我想提一下,Silverlight不需要安装.NET框架。 Silverlight also runs on the Mac and the Silverlight runtime includes a trimmed version of the .NET framework. Silverlight也可以在Mac上运行,Silverlight运行时包括.NET框架的精简版本。

Silverlight (along with the toolkit) has all the controls out-of-the-box that you've mentioned. Silverlight(以及工具包)具有您提到的所有可用的控件。 It has good interaction with Javascript not only can you use javascript to manipulate the Silverlight content, silverlight application code has good access the the containing browser. 它与Javascript具有良好的交互性,您不仅可以使用JavaScript来操纵Silverlight的内容,而且Silverlight应用程序代码也可以很好地访问包含的浏览器。

However since you will always be using IE7 and are happy to install SL and .NET frameworks on the clients it would suggest that you have significant control of the client machines. 但是,由于您将始终使用IE7,并且很乐意在客户端上安装SL和.NET框架,因此建议您对客户端计算机具有重要的控制权。 In this case why deliver the UI in a browser at all? 在这种情况下,为什么要在浏览器中完全交付UI?

You could build a WPF based applicating with a one-click install (or group policy base MSI install). 您可以通过一键安装(或基于组策略的MSI安装)构建基于WPF的应用程序。 You could use a fully Silverlighted app with RIA so the browser is merely a host (good comms with Javascript becomes immaterial). 您可以使用带有RIA的完全Silverlighted应用程序,因此浏览器仅是宿主(与Java进行良好的通信变得无关紧要)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM