March 16, 2011

Add OCX to C#

- Adding an OCX to a .Net Project
- How to add a OCX in C# Project?
- How to add a OCX in Windows Form Application?
- Adding a VB6 OCX in C# projects

1- Create a new Windows Form Application
2- goto Menu > Tools > Choose Toolbox Items
3- goto to COM Components tab and find Browse button
4- Add the OCX (you could install the OCX with regsvr32 command)
5- Drag it from toolbox and drop on form and enjoy


Anonymous said...

When I add an OCX the Visual Studio closes... I'm using VS2010 on a Windows 8 system.

Unknown said...

Did you try to register your OCX?
WinKey + R > type regsvr32 and then your component full name and address. YOu can do this in COMMAND.