steps for compilation and running activex control
Post on 21-Feb-2018
214 Views
Preview:
TRANSCRIPT
-
7/24/2019 Steps for Compilation and Running ActiveX Control
1/1
Steps for compilation and running ActiveX control
1. Write the code for ActiveX control using notepad and name it as AClass.cs
AClass.cs
using System;
using System.Runtime.InteropServices;namespace ANamespace
pu!lic interface ASignatures
string "Name#$; string SName#$; int Age get;%
%
&ClassInterface#ClassInterface'ype.Auto(ual$)pu!lic class AClass *ASignatures
pu!lic string "Name#$ return +Active,+; %
pu!lic string SName#$ return +Control+; % pu!lic int Age get return -1/; % %
%%
1. Save it in C:\Program Files\Microsoft Visual Studio 9.0\VCfolder
-. 0pen visual studio 00! command promptfrom start 2 all programs3. 'o compile the ActiveX control type csc /t:library AClass.cs
4. To register the component type regasm AClass.dll /tlb /codebase
/. No5 open another notepad file and enter the 6avascript code to invo7e the component andsave it as Active,1.html on (es7top
Active"#.$tml8html28head2
8script language9+6avascript+2
8: oad the ActiveX o!6ect 2 var , 9 ne5 ActiveX0!6ect#+ANamespace.AClass+$;
8: Access the
top related