.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

ActiveX control replacement by silverlight technology

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :WPF


We developed an ActiveX plug-in for PowerPoint on Windows  The control allows content to be created in some graphical application, transferred to a PowerPoint presentation, and manipulated in 3D in PowerPoint in a view-only manner.  Graphical application is a scientific application which provides ability to create atoms, molecules, defining their bonding and defining surfaces, so user basically create molecules, proteins into the application and transfer it into ActiveX control using  copy-paste.

We want to shift this technology from ActiveX to other, so that it can be used by any software like Microsoft Word, SharePoint, Web browser, and Microsoft Excel.


Can someone tell me alternative of ActiveX? What other technologies can be used to develop same functionality in Microsoft domain? Any pointers indicating for Advantage and disadvantage of using ActiveX and other proposed technology?

I heard about Silverlight, but I do not know anything how it would be useful and how it is beneficial over ActiveX?

View Complete Post

More Related Resource Links

How to Bind a child control with properties of the parent control in Silverlight and WPF?

Dear Experts, I have a usercontrol in Silverlight and I want to enable the update button inside the usercontrol with property defined in the usercontrol. For the proof of concept sake I have defined the usercontrol xaml and the code behind in VB.NETBelow is the XAML and VB.NET Code. ----------------------------------------------------------------------- <UserControl x:Class="SLBAppAssementQuestions.SilverlightControl1"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"     mc:Ignorable="d"     d:DesignHeight="300" d:DesignWidth="400">     <StackPanel>         <CheckBox x:Name="chkBox1" Margin="10" Checked="chkBox1_Checked" >Checkbox1</CheckBox>         <CheckBox x:Name="chkBox2" Margin="10" Checked="chkBox2_Checked">Checkbox1</CheckBox>         <Button  x:Name="BtnUpdate&q

Silverlight media player control for mvc

I wamnted to add a silverlight media player to my MVC site. there was a silvlight Media player that you could drag and drop on a page from the tool box, but I cant find it anymore. I am not sure it was good for mvc anyhow,   what is the easiest way to get a silverlight media player up and running on a mvc site, I really dont want to make my own, incorarating a silverlight app just for the media playerr seems like a fair bit of work, i was really looking for the drag and drop option we had in VS2008  I'm using VS2010 .net 4 silverlight 4 Any ideas?

Using ActiveX control in WPF

I'm attempting to host an ActiveX control in a WPF app. After attempting to use existing info on the web and here, I've hit a dead-end. I need to use an ActiveX control provided to communicate with a UV power meter . They provide an application that registers and uses the control and even includes some useful demo apps. I stripped out the OCX file and put it here if needed. You won't have the power meter to talk to, but the app and demos will still load the ActiveX control successfully. I created a simple Windows Forms application. I was able to bring the ActiveX control into the toolbar, drop it into my form, and everything is fine. The demo apps they provide do this as well. However, getting this to work in a WPF environment is another story. The control can't be added to the toolbox and "dragged" into the app. So far I've tried two techniques: Technique found here . I am able to add a reference to the control, but then I enter namespace ____. The xmlns:ax namespace it suggests making cannot find the information. Here's my attempt based on what the object viewer tells me: xmlns:ax="clr-namespace:OphirUsbXLib;assembly=Interop.OphirUsbXLib" Technique found here . This is essentially to create a new project that creates a library based on Windows Forms, which contains the ActiveX control (yikes). I am able to add the Windows Forms Host, but I canno

Activex control to Print a Zebra Tag

Hi All, I'm trying to create an Activex control (similar to the Crystal Activex) to Print tag's from a Client side to a Com Port 1. I created a User control I can pass values to it etc, but It won't Print. Any Ideas? User Control Code:Imports System.Text Namespace Tag Public Interface AxMyControl Property UserText() As String End Interface 'AxMyControl Public Class myControl Inherits System.Windows.Forms.UserControl Implements AxMyControl Private mStr_UserText As String Public Property UserText() As String Implements AxMyControl.UserText Get Return mStr_UserText End Get Set(ByVal Value As String) mStr_UserText = Value TextBox1.Text = mStr_UserText Print() End Set End Property Public Function Print() As Boolean Dim tstr As New StringBuilder ' Printer Code tstr.Insert(0, "^XA") tstr.AppendLine("") tstr.Append("^LH5,30") tstr.AppendLine("") tstr.AppendLine("") tstr.Append("^FO75,110^BY1.5") tstr.AppendLine("") tstr.Append("^B3N,N,75,Y,N") t

ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current

Ok actually i m new to .net so you can tell me that i m right or wrong.   1. First of all i created a class library project in which i added a Windows Form (ModuleTest.cs) in this form i added a web browser control.This form is having on method. public void CheckModule(String username, String password, String modulename, List<CustumFields> objList)         {                  ----------------                  -----------------           }   then i build this whole library.(ClassLibrary.dll). 2. I created a web site in which i added ClassLibrary.dll reference.     then i placed on button control over the page protected void Button1_Click(object sender, EventArgs e)         {             ModuleTest obj = new ModuleTest();             List<CustumFields> objlist= new List<CustumFields>();             obj.CheckModule("admin", "adm1n1@3", "Testing102", objlist);     

ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current

I have created a class library in which i m having Web Forms.now when i use this dll in ASP.NET websiteand call methods            ModuleTest obj = new ModuleTest();            List<CustumFields> objlist= new List<CustumFields>();            obj.CheckModule("admin", "password", "Testing102", objlist);then it gives errorActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartmentthis.components = new System.ComponentModel.Container();            this.panel1 = new System.Windows.Forms.Panel();            this.webBrowser1 = new System.Windows.Forms.WebBrowser();            this.timer1 = new System.Windows.Forms.Timer(this.components);            this.SuspendLayout();this error occurs at this.webBrowser1 = new System.Windows.Forms.WebBrowser();when i mouse over webBrowser1 then it shows null....Whats the problem?

Silverlight user control, canvas "layout root", no key events ever.



I'm trying to use a UserControl in Silverlight and I want to handle some key events. The user control is a network diagram, laying out data points in a circle and showing the relations between points. It consists of a canvas to which various shapes (ellipses for data points, lines for relations between points). I'd like it to be focusable and receive mouse and keyboard events to add support for things like rotation, scaling, and randomizing the layout of data points (how readable the diagram is depends on the data and where in the circle related data points are located, but I'm not going to attempt any smart layout logic that figures out where to put the points; instead, I simply allow the points to be laid out in random order along the circle); I was thinking F5 (with it's "reload/refresh" connotations) would be a neat key for this.

Trouble is, I am never ever receiving any key events. Mouse events apparently do bubble up to the canvas, but only from labels - the data points have labels - so I can handle them there. Currently this allows me to resize and rotate the diagram by scrolling the mouse wheel (with the shift key down to rotate, without to scale) if and only if the mouse cursor is over a label. Not *quite* what I want!

After some quick googling I've attempted to set IsTabStop to true on the UserControl containing the Canva

Using Bing Map Control in Silverlight For Beginners

In this post I will show you how to use the Bing map control in the silverlight application to show the location on map. For this you have to download the SDK for the Bing map control from here. By downloading and installing the Bing map SDK on your system you will have the libraries and the SDK for the Bing map on your system.Now let us start to create the application to use the Bing map.

Cannot call an ActiveX control from within a .NET WebBrowser control


I have a simple webpage that starts an ActiveX control. Here's the code:

<script language="JavaScript" type="text/javascript">
   try {
      document.write("<object classid='clsid:1D980DC8-9C45-11D3-9C5C-00A13234F0A2' id='myActiveX' name=' myActiveX'  width='0' height='0'></object>");
      var bReturn = myActiveX.StartControl();
   catch (e) {
      document.write('Failed<br>' + e.name + '<br>' + e.message);

This works well when I call this page directly from Internet Explorer on Windows XP, 7 & server 2003

I created a .NET form in Visual Studio, and added a .NET WebBrowser Control from the toolbox. I set the URL of the WebBrowser to call the same web page.

I complied it & ran the executable. This works well from Windows XP & server 2003, but fails in Windows 7. Here's the JavaScript error message:


How to get Metadata of a ActiveX control on fly in C#?


I am facing problem in getting metadata(like properties,Events and methods) of a ActiveX controls on fly from a web page(using <OBJECT> tag and ActiveXObject or CreateObject), just by giving its ClassID or ProgramID using C# or C++.

Is there any standard way to get meta data of a activex control present in a web page using C# and C++?

Actually i am working for a product based company. The product on which i am working has a feature of Web automation, Currently our product has no capability of automating Activex controls present in a web page. We are enhacing our product to have this support.

i am doing research on this and stucked up at this point of getting meta data of a ActiveX control. I need meta data to know its list of attributes,methods and events, which will help in automating the activex control.

Help me in solving this issue, provide me if any sample code or examples avaialble Or  provide me links to refere.













DataPager Silverlight Control for Beginners

It was a long time when I have post on silverlight data grid control, at that time I was thinking of posting complete series of the post on the data grid control I have posted on the data grid grouping control but I didn't post on the paging of the data grid records. Now after long time I have time to see the silverlight and its paging control, I know there are lot of tutorial regarding data pager control But I have this for the absolute beginner who are just started their journey of the Silverlight.
For this example I have two controls added in my xaml are one is the data grid control and the second one is the data pager control.
You can see the code for the data grid control and the data pager control in the List 1, Here you can see that I have set the properties of the data grid control like auto generate columns to false mean I will set the columns for the data grid control, IsReadOnly is set to false mean this grid is used for the display of data and the vertical and horizontal grid line brush and GridLinesVisibility is set to All to show both the horizontal and vertical lines.

Accessing window control library .dll from .aspx page (ActiveX)


I have a control in a 'window control library' which handles - 'drag and drop' files from computer to a listbox control, I then reference this .dll in .aspx (See code below). Now, when i try to access this through webserver for drag and drop files i get following errror - The type of the first permission  that failed was : System.Security.Permission.FileIOPermission.

How do I handle this, so that drag and drop of files can happen over the webpage residing at webserver.


namespace testWinControl1
    public partial class UserControl1 : UserControl
        private string appTitle = "DragnDrop Files";
        public UserControl1()
        private void button1_Click(object sender, EventArgs e)

Problem hosting .NET build ActiveX Control in existing VB6 ActiveX control


Hi all,

After struggling several days with this it's time to find some help.

I'm developing for a third party application that supports a modular design by hosting custom ActiveX Controls in an ActiveX Control Container (basically a Tab control with each hosted control on its own tab).
An ActiveX Control build with VB6 with no added code shows up just fine, but I don't want to use VB6, I want to use a .NET UserControl which exposes itself as an ActiveX Control. I successfully created a class library project with a Windows Forms User Control, which is exposed to COM as a control. With some extra registry entries, the control even shows up in the VB6 designer. If I create a small VB6 test application with my .NET control on the form, it shows up just fine.

The problem is that nothing is painted on the tab control, if I add my control to the third party software. The UserControl constructor is called (twice), but that's it. When I switch tabs, the information from the previous tab stays visible, so no Draw() operations are executed at all.

I have read some articles that anything else but Internet Explorer is not supported for hosting ActiveX controls build in .NET but I'm not sure if this is still true.

I hope there is a solution to get this to work in .NET, otherwise I would have to switch to C++ (which

ActiveX Control


Hi ,

 Can any one tell me how to make an  ActiveX control that is installed on the windows and when i double click on any work in the browers (IE,FireFox) then a popup open and Display this word in that popup.  

Please help.


Convert VB6 ActiveX Control to VB.NET And Incorporate it Into ASP.NET

I have an existing ASP.NET application that is written mainly in VB.NET.  Currently one of the ASPX form has an ActiveX control on it.  The ActiveX control is a Windows.Form written in VB6.  Inside that ActiveX control, it has an old third party ActiveX control (Tidestone Formula One) embedded in it.  In other words, we have a Windows-Form VB6 ActiveX wraps around another ActiveX control.

I would like to convert that ActiveX control from VB6 to VB.NET in order to bring everything to the same .NET platform and also to simplify debugging.

I have already converted the VB6 ActiveX control to VB.NET using Upgrade Wizard in Visual Studio 2003.  The problem is that Visual Studio 2003 cannot create Windows.Form ActiveX wrapper.  It can only convert the VB6 ActiveX into a DLL class library (not a control).  I cannot use the converted DLL into the ASPX web form because the DLL is not a control.

I know one of the solution is to replace the old third party ActiveX with .NET version and rewrite the VB6 ActiveX wrapper.  But I am not ready to do this just yet because I am just newly assigned to maintain that application and I need to understand what all my options are.

According to chapter 10 in the Microsoft document "Upgrading Visual Basic 6.0 Applications to Visual Bas

Visual Studio 2005 C# refuses to accept x64 C++ activex control as reference



Firstly: Sorry about my English.


I have many 32bit OCXs, they work fine on x86. But! When I rebuild them on x64, there is an error.

I can not use one of them.

On the developer machine is a Windows xp x64 professional and Visual Studio 2005 sp1.

So, I register the COM control, and after it i can make an instance in ActiveX Test Container (x64) but in VS2005 i can not use this com control. It is not in COM tab page and when i browse the abc.ocx, VS2005 refuses it...

Error message is the next:

A reference to the "...." could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component.

This contol is a visual control (shows pictures, resize them, ...) and the others are not.

Selecting One Checkbox Control In DataGrid Control Using MVVM Using Silverlight

In this post I will show you how to select single check-box control when you have single check-box control in each row of the datagrid control. As you all know that check-box controls are normally used for the multiple selection and radio buttons are used for single selection. But there are sometimes requirement that control should be check-box and selection should be single. Mean if user view data in the datagrid control then he/she should only select one check-box at a time not more then one. Main page is shown in the Image 1. Here you can see that I have placed check-box control in the first column of the datagrid control which I have also highlighted.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend