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 2:30am
Edited 21-Mar-11 3: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
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 490
1 Shai Vashdi 474
2 Sergey Alexandrovich Kryukov 291
3 OriginalGriff 135
4 praveen_07 115
0 Sergey Alexandrovich Kryukov 9,185
1 OriginalGriff 5,335
2 Peter Leow 4,040
3 Maciej Los 3,540
4 Abhinav S 3,308


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 21 Mar 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid