Click here to Skip to main content
13,150,471 members (33,653 online)
Rate this:
Please Sign up or sign in to vote.

I want to create (Visual Studio 2008) a new Terminal Services ActiveX component using the existing MSRDP libraries.

I succeeded in creating a Windows Form with the Terminal Services Component for a 'normal' application.
But I want to embed it within an HTML page as an ActiveX.

I can do it with the original Mirosoft Component but I have a blank page with my component.
I tried with a simple textbox (to see if it was not an error of me) and it worked.
I use the 'drag and drop' to auto-generate the 'InitializeComponent' UserControl method.

Here it is :

private void InitializeComponent()
      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Test));
      this.axMsTscAx1 = new AxMSTSCLib.AxMsRdpClient2();
      // axMsTscAx1
      this.axMsTscAx1.Enabled = true;
      this.axMsTscAx1.Location = new System.Drawing.Point(58, 17);
      this.axMsTscAx1.Name = "axMsTscAx1";
      this.axMsTscAx1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMsTscAx1.OcxState")));
      this.axMsTscAx1.Size = new System.Drawing.Size(192, 192);
      this.axMsTscAx1.TabIndex = 1;

No generation error. Dll registration ok. But I have a blank page with a red cross inside (the ActiveX is not loaded properly) when I launch the HTML (using the 'object' tag with the corresponding CLSID).

Many thanks for your help.
Posted 21-Mar-11 2:30am
Updated 21-Mar-11 3:41am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I've launched the AxImp.exe utility to create the two libraries AxMSTSCLib.dll and MsTSCLib.dll with the /keyfile argument which leads to my snk project key.

I've imported the generated libraries in my project and used them to create my component.

The Terminal Service Component is well embedded in a UserControl and is well displayed in my HTML page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170924.2 | Last Updated 21 Mar 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100