ActiveX is a Microsoft-created technology that enables different software applications to share information and functionality. ActiveX only works with Microsoft applications like Word, Excel, Internet Explorer and PowerPoint, and will only work on a computer running the Windows operating system.
- IE has to be opened as "Run as Administrator" mode.
- Go IE settings-> internet options-> security tab-> custom level -> Initialize and Script ActiveX controls not mark as safe for scripting (mark it enable)
ActiveX only works at Internet Explorer(IE).
- In order to open a txt file, a txt file(named as Notepad) has to be created in C drive
- Open ActiveX page
- Click the button "ActiveX File Calling"
- "ActiveXClass.cs" class has to be putted in "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
- Then we have to make a dll of this class in that directory and then register that created dll. To do this:
- run command prompt(Admin)
- cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 [go to the directory]
- csc /target:library /out:ActiveXClass.DLL ActiveXClass.cs [create dll of that class]
- regasm ActiveXClass.dll /tlb /codebase [register dll]