Introduction
Recently, I has to use an ActiveX object (ThumbCtl
class) and I had some problems with using an ActiveX control on a Windows Form.
Solution
You must consider that ActiveX controls can't be put directly on a Windows Form. For that, you have to do these steps:
- Generate wrapper assemblies for your ActiveX object. You can do this using the aximp.exe tool, e.g., aximp.exe c:\windows\system32\WEBVW.dll. Now you have generated two files: AxWEBVWLib.dll and WEBVWLib.dll.
- Add a reference to AxWEBVWLib.dll to your project.
- Now use your control like this:
AxWEBVWLib.AxThumbCtl axctl = new AxWEBVWLib.AxThumbCtl();
mypanel.Controls.Add(axctl);
axctl.Dock = DockStyle.Fill;
axctl.displayFile(@"c:\temp\graphics.jpg");
Application Developer and Solutions Architect with many skills in programming languages and technolgies. Specializes in Microsoft .NET platform for last 6 years. Additionally Database Developer with wide experience in MySql, Microsoft SqlServer. Specializes in in building Workflow Software using LogicBase Studio from Transparent Logic (Now Altiris Workflow Solution). Lastly improve his skills in software development in Lotus Domino and Sharepoint. His primary goal is to improve skills in building Enterprise Architectures and Project Management.