Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
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();
      ((System.ComponentModel.ISupportInitialize)(this.axMsTscAx1)).BeginInit();
 
      //
      // 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;
      
 
      this.Controls.Add(this.axMsTscAx1);
      ((System.ComponentModel.ISupportInitialize)(this.axMsTscAx1)).EndInit();
 
    }
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 3:30am
Edited 21-Mar-11 4:41am
v2

1 solution

Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 319
1 Kornfeld Eliyahu Peter 265
2 Maciej Los 249
3 BillWoodruff 205
4 Sergey Alexandrovich Kryukov 175
0 OriginalGriff 5,107
1 DamithSL 4,157
2 Maciej Los 3,595
3 Kornfeld Eliyahu Peter 3,450
4 Sergey Alexandrovich Kryukov 2,741


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 21 Mar 2011
Copyright © CodeProject, 1999-2014
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