Home » MS Office

Can't figure out how to register MSCOMCTL.OCX in Windows 7

I've been searching for answers all afternoon trying to register this MSCOMCTL.OCX file, nothing is working.  The closest I got away from the "Component 'MSCOMCTL.OCX' or one of its dependencies not correctly registered: a file is missing or invalid" that had been plaguing me was when I tried to register it through by typing REGSVR32 MSCOMCTL.OCX in the RUN field and the error message returned is 'The module MSCOMCTL.OCX may not be compatible with the version of Windows that you're running.  Check if the module is compatible with an x86(32-bit)or x64 z(64 bit) version of the regsvr32.exe'.

All I am trying to do is install some freeware, can anyone help me?


8 Answers Found


Answer 1

Hi Clemson.  As far as I know, this component  is not compatible  with Windows 7, therefore, you must run  your application using the Windows XP compatibility mode.
Best regards,
Edgar Lugo López

Answer 2

Since .Net 2.0

        Dim sp As New System.IO.Ports.SerialPort
        sp.PortName = "COMx"
        sp.BaudRate = 9600
        sp.DtrEnable = True
        End Try

Answer 3

Thank you All for your friendly help.

Hi Clemson,

Welcome to MSDN forums!

The Mscomctl.ocx is Windows Common Controls.
Sometime certain Microsoft Libraries can become unregistered when installing and uninstalling a lot of software. One very common problem is the MSCOMCTL.OCX.

To correct the error, first search your drive for MSCOMCTL.OCX to see if you have it. If not you can download it from HERE: http://www.majorgeeks.com/files/mscomctl.zip

The file  should be placed in your C:\WINDOWS\SYSTEM directory.
Once it is there click START--> RUN and type "REGSVR32 MSCOMCTL.OCX" (No quotes) in the box to register  this control.
That should fix the problem.

Or please register this control under Administrator role.

Please check  this similar case for detailed instruction:

Best regards,
Martin Xie

Please remember to mark the replies as answers  if they help  and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.


Answer 4

If you have the 64-bit version  of Windows 7, see the following:


Just an FYI, all Visual Basic 6.0 runtime components are supported under Windows 7.


Answer 5

Hi Clemson.  As far as I know, this component  is not compatible  with Windows 7, therefore, you must run  your application using the Windows XP compatibility mode.
Best regards,
Edgar Lugo López
No entiendes realmente algo a menos que seas capaz de explicarselo a tu abuela - Albert Einstein

Thanks for your explanation! I understand this part.

Answer 6

How obnoxious that you experts mark this as answered by posting a link which instructs the user to execute the command that  the OP clearly said in his 2 sentences generated the error.  Maybe this functionality should be outsourced  after all. Then I tried to vote against your answer being helpful,  and what do you know,  the only vote allowed  is positive, boy oh boy this is so objective I really must commend the whole process. I'm going back to acquiring MS products from bit torrent.

Answer 7

Had error with the same code "DLLRegisterserver error code 0x08002801c" - all you need is to create a bat-file with "REGSVR32 MSCOMCTL.OCX" inside and run it as administrator.

Answer 8

To correct the error, first search your drive for MSCOMCTL.OCX to see if you have it. If not you can download it from HERE: http://www.majorgeeks.com/files/mscomctl.zip

The file should be placed in your C:\WINDOWS\SYSTEM directory.
Once it is there click START--> RUN and type "REGSVR32 MSCOMCTL.OCX" (No quotes) in the box to register this control.
That should fix the problem.

Or please register this control under Administrator role.
! If you have any feedback, please tell us.


Everyone always forgets to mention the "Administrator role" or, like here, people overlook it.




This worked for me beautifully.  Get the afrementioned zip, extract to said directory ( C:\WINDOWS\SYSTEM directory. ) And instead of doing the "Start > Run" go to Start > Programs > Accessories > LEFT CLICK ON "Command Prompt" and choose "RUN AS ADMINISTRATOR"


then use "CD C:\Windows\system"

NOT \system32

Then "regsvr32 mscomctl.ocx"




I converted a VB6 application in VB.net 2008 by using VS 2008 conversion wizard I have encountered a problem in using Tab control in VB.net. I used “Microsoft TabStrip Control 6.0 (SP6)” in VB 6 project. VB.net converter wizard converted it properly and add reference to “AxInterop.MSComctlLib.dll” and “Interop.MSComctlLib.dll”. I am using TabStrip on a Form that is use “Hide” instead of “Close”. So problem is when this form shown again following instruction raises exception:

a = tbsMain.SelectedItem.Index 

Exception: NullReferenceException was unhandled “Object reference not set to an instance of an object.”

But when I browse the selected item’s index value using “Quick Watch” option (while debugging) it returns the correct index instead of nothing value. I am unable to understand what is the problem and is restricted to use only this control. While debugging when I browse SelectedItem property in “tbsMain”, it contains an object of “MSComctlLib.TabClass”, I think when “Hide” the Form reference of this object’s memory location is lost but this is just an assumption.





We are working on a Visual Basic 6.0 application. This application requires socket programming.

We have made used on winsock control provided in components ( C:\Windows\System32\MSComCtl.ocx ) of Visual Basic 6.

Currently we are completing our application development, and while deploying the software, MSComCtl.ocx file is included into the installer.

Will there be any type of licensing issues in including this file into our installer. Please let me know whether we need to buy any license for including this

MSComCtl.ocx into our package.






Our application registers some vb-6 ocx controls that we deliver upon installation. Instantiating these controls works absolutely fine on xp systems, however, the same instantiation fails on 64-bit windows systems. Our application is run under WOW and is installed under c:\program files (x86).

All registry entries related to the ocx seem to be fine on the 64-bit systems. however, when I try to make a simple CreateObject () call for a ProgID defined in an .ocx, it fails to create with the message: "ActiveX cant create Object..." the same thing happens at run-time within the application.


Not really sure what is going on that only seems to happen on 64-bit Windows. Any ideas ?




We use a calendar control as part of several MS Access 2007 databases.  This is not a problem in Windows XP, but we are migrating to 64 bit Windows 7 and are having trouble registering this OCX control under this OS.  We've tried running as administrator, both from a shortcut and from a command prompt.  We've also tried logging into the machine as a local admin - none of these works.  The error when failing is 0x8002801C.

I've read that Microsoft is possibly fazing out support for VB6 controls in the 64 bit version of Windows 7 but have heard nothing definite.  If there is an alternative to using this control that would still work with Access 2007 and run under Windows 7, I'm willing to give that a try.  Office 2010 is not out yet so there must be something that will work in the interim.

Thank you.

I have a VB 2008 application that uses MSFLXGRD.OCX in a couple of modules.  All works well under Windows XP, but that control will not register under Windows 7.  When I try to use regsvr32 to register the control, it tells me that I need administrative rights, and I am the administrator of the system.  There must be some further security for the registry under Windows 7?

Any guidance or clues would be greatly appreciated.  This application is critical to company operation, and with the impending move from XP to Windows 7, I really need to get this resolved ASAP.



I am running Windows 7 Ultimate 64-bit on a 64 bit Dell XPS 435 with 6 GB of ram.

I am working with the Microsoft SOAP 3.0 toolkit. The error occurs when trying to run the WSDL generator. It does not appear Microsoft has developed any useful tutorials after this one which was created in VB6. I'm going through the SOAP 3.0 toolkit, but got snagged when I couldn't create the necessary WSDL file.

Any help would be appreciated.



hi friends i want to create a new ocx control in c# and the same thing i want to embed in web application please tell me its urgent and i came to know we can develop ocx controls in vb but i am unable to do in .net help me out

thanks in advance

So I downloaded a program and it can't run because it says Mscomctl.ocx is missing or unregistered... Well I downloaded Mscomctl.ocx and put it in my C:\WINDOWS\SYSTEM folder and went to Start>Run and typed REGSVR32 MSCOMCTL.OCX to register it but it says:


To register a module, you must provide a binary name.


So I went to Start>Run and typed REGSVR32 [/s] MSCOMCTL.OCX but it comes back with the same error.


Please help!


I'm on a Vista OS.

 I am using htmlhelp in my application written in Delphi 7 to show the contents of a chm file. I'd like that the help window created by the hhctrl.ocx file when I call the function

 Result:=HtmlHelp(0, PChar(Application.HelpFile), HH_DISPLAY_INDEX, 0);

to display the index would not appear immediately onto the screen, in order for me to issue the following commands for removing the borders and setting the position:

    thestyle := GetWindowLong( Result, GWL_STYLE );
    thestyle := thestyle and not WS_CAPTION;
    thestyle := thestyle or (WS_POPUPWINDOW or WS_EX_TOPMOST or WS_EX_LAYERED);
    thestyle := thestyle and not WS_BORDER;
    thestyle := thestyle and not WS_DLGFRAME;
    thestyle := thestyle and not WS_THICKFRAME;
    SetWindowLong( Result, GWL_STYLE, thestyle );
    SetWindowPosNative( Result, 0, 250, 250, 700, 400,  SWP_FRAMECHANGED or SWP_NOZORDER);

Only at this point the window should apper. Currently the help window appears with the borders, then after issuing the commands for the style it disappears and it appears in the new position with no borders. How can I keep the window suspended after calling the HtmlHelp funcion in order to apply the new style and in order to issue then the command for being mapped onto screen?

Thanks in advance,




I am developing a Windows Form application using MS Visual C# 2010 Express and am having trouble with an ActiveX control. To give some background on what I am attempting to do: We have a number of Sony network cameras at remote locations, which we use for customer service, monitoring and security. The cameras stream video over our network and come with built-in webservers such that you can view the video stream in IE via a downloadable ActiveX plug-in provided by Sony. In addition to the cameras, we use VNC clients for remote desktop viewing at various locations.

The goal of my application is to integrate two video feeds per location, as well as VNC client functionality into one Windows Form application. Locations will be selectable via a combobox control. When the user selects a new location, the form will be refreshed to show the video and desktop for that location. The problem I am having right now is with the Sony ActiveX control. I have successfully imported it into the Visual Studio toolbox and added it to my form. If I set the ParamCamAddress property on the control to the IP address of one of our cameras in the Designer (i.e., the IP address is set at start-up / hard-coded) and run the application, the ActiveX control displays the video feed as expected.

The problem is that I need to be able to change that parameter and reload/refresh the control so that the video feed from the new location selected will display. If I do something like this when the combobox event fires, it doesn't work:

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  Location location = _locDict[comboBox1.SelectedItem.ToString()];
  this.axSonySncRz25View1.ParamCamAddress = location.CameraIp;

I know that's too simple, so I looked at the Visual Studio-generated code in Form.Designer.cs. I find this relevant code in the InitializeComponent() method:

this.axSonySncRz25View1 = new AxSonySncRz25ViewLib.AxSonySncRz25View();

this.axSonySncRz25View1.Enabled = true;
this.axSonySncRz25View1.Location = new System.Drawing.Point(0, 0);
this.axSonySncRz25View1.Name = "axSonySncRz25View1";
this.axSonySncRz25View1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSonySncRz25View1.OcxState")));
this.axSonySncRz25View1.Size = new System.Drawing.Size(880, 600);
this.axSonySncRz25View1.TabIndex = 2;


I don't see where the IP address I specified in the ActiveX control properties in VS Designer is being set, but it works. I've searched through MSDN and online for general information about ActiveX/.NET interoperability, but haven't come up with much regarding how to reload or refresh OCX controls (that I understand). I've also tried using the code above in various arrangements in my Form.cs code, but to no avail. I just don't understand the principles involved here to know what to do. If someone can point me in the right direction or provide some coding advice, I would be very appreciative.



I'm running Visual Studio 2005 and I've been developing a Winforms app (ClickOnce deployment).  Up till now both development and use have been in a Window XP environment.  This program uses the control mschrt20.ocx in one minor screen.  Quite frankly my use of it has been mostly trial and error and it's going to be replaced.  

Due to earlier problems with XP machines, I have a check at startup that makes the call "regsrvr32 /s mschrt20.ocx" if it cannot instantiate the control. At this time it seems to be running without any error.  However the program's first installation on a Win7 machine has resulted in the error "Error registering chart ocx, error = Class not registered (Exception from HRESULT:0x80040154(REGDB_E_CLASSNOTREG))" when the user tries to run the form that actually uses the ocx.

(I should mention that I am at a bit of a disadvantage here because the machine in question is far away and I don't yet have access to a Windows7 machine personally.)

Anyone else have this problem?


I Have a vb6 app that uses activex control grid32.ocx. When i run the app on W7 every form functions except for ones with this control. I get the old 339 error. Any ideas or any ideas of what control would be useful to replace?




I know that the older mscomm32.ocx had its kill bit set and have a newer version and have been able to register it under Windows 7 but I still cannot get the communications control onto my form(s).  I keep getting the error message that the activex control is not supported. 

I know that I need to migrate away from this control but time does not permit and I need to be able to continue supporting my users as they migrate up to Office 2010 and beyond.

I've been able to get this to work on Access 2007 under XP so is this a Windows or Access problem?

Any ideas will be greatly appreciated.


I have an app written as an HTA with several ActiveX controls running as a 32-bit process on Windows 7, Vista, and XP (and earlier). It all now works except the Font dialog. The font object is null when referenced on a fresh install of Windows 7 or with KB974431 update installed.

It does work normally on Win7 when I have Visual Studio (2008) installed. I have a common dialog lpk license file and file manager and common dialog objects in my hta main page. The activex ocx files for comctl32.ocx, comdlg32.ocx, and mxcomctl.ocx are registered in sysWOW64 or system32. It behaves the same on either 64 or 32 bit Windows 7.

What am I missing? Why is the font dialog object not created?

John Hedges



I am developing an application (MDI based) and i want to insert an activex control into my application. I have one toolbar and menu, can i insert ocx there, i have to register dragon engine on application start???


Please reply as soon as possible..

Thanks & Regards,



I am developing a simple C# Windows Application.  Recently, without substantial change, it started crashing on exit with this message:

>   This program requires a missing Windows component.

>   This program requires flash.ocx, which is no longer included in this version of Windows.

The application does NOT use Flash and has no references to Flash that I can find.  It is using the default references:

>   MSHTML, System, System.Data, System.Deployment, System.Drawing, System.Windows.Forms, System.Xml

The system is Windows 7 64 bit and Visual Studio 2005.

Are there references to Flash somewhere that I'm missing?  Any way to correct this error?

Much thanks for your help.


This is very puzzling.  My WinForm application has been working fine without any issue.  However, recently, the same application installed from the "Setup/Installer" started throwing SEHException where the application runs without problem through Visual Studio 2008 enviroment... both debug and release.  When I move my mouse over the Media Control section where "play" button is, SEHException is thrown.

Can someone help please?

The exception stack is:

System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.AxHost.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


I need to use a custom OCX control with a Windows Service application.

I have built a Windows Form application test harness to test interoperability with the OCX control. To do that I added the OCX to the Toolbox, dragged it onto the form and used it successfully.

I now want to do the same in the Service application. However when I create and open the project the OCX control has disappeared from the toolbox.

I have read some similar posts from the past and the general response is that there is no need for an OCX control in a Service application because the service has no visible real-setate to use the OCX on. However in this case the OCX does not have any visual components. It is used to expose functionality to communicate with a third party application. The same third party has provided the OCX to allow others to implement certain functionality in their applications.

Is there any way to be able to use this type of OCX in a Service application? If not, is there a work-around?


Bas Groeneveld


Hi All,

I tried the font dialog in VB6 with a form app and it could launch font dialog, but when I tried to do the same in javascript, it failed with exception:

 Could not complete the operation due to error 800a8000

at line calling ShowFont().

Here is my html code: any ideas?



function doclick() {
        var fontDlg = document.all.fontDlg
  //var fontDlg = new ActiveXObject("MSComDlg.CommonDialog");

        cdlCCRGBInit = 1;
        cdlCCFullOpen = 2;
        cdlCCPreventFullOpen = 4;

        fontDlg.Flags = (cdlCCRGBInit | cdlCCFullOpen | cdlCCPreventFullOpen);
        fontDlg.CancelError = false;
        fontDlg.Min = 8;
        fontDlg.Max = 72;
        fontDlg.DialogTitle = "Change font settings";


<input type=button onclick=doclick() value="click me"/>

    <OBJECT id="fontDlg" style="LEFT: 224px; POSITION: absolute; TOP: 24px" classid="clsid:F9043C85-F6F2-101A-A3C9-08002B2F49FB" CODEBASE="http://activex.microsoft.com/controls/vb5/comdlg32.cab #Version=1,0,0,0">
        <PARAM NAME="_ExtentX" VALUE="847">
        <PARAM NAME="_ExtentY" VALUE="847">
        <PARAM NAME="_Version" VALUE="393216">
        <PARAM NAME="CancelError" VALUE="0">
        <PARAM NAME="Color" VALUE="0">
        <PARAM NAME="Copies" VALUE="1">
        <PARAM NAME="DefaultExt" VALUE="">
        <PARAM NAME="DialogTitle" VALUE="">
        <PARAM NAME="FileName" VALUE="">
        <PARAM NAME="Filter" VALUE="">
        <PARAM NAME="FilterIndex" VALUE="0">
        <PARAM NAME="Flags" VALUE="0">
        <PARAM NAME="FontBold" VALUE="$!form.bean.fontBold">
        <PARAM NAME="FontItalic" VALUE="$!form.bean.fontItalic">
        <PARAM NAME="FontName" VALUE="$!form.bean.fontName">
        <PARAM NAME="FontSize" VALUE="$!form.bean.fontSize">
        <PARAM NAME="FontStrikeThru" VALUE="0">
        <PARAM NAME="FontUnderLine" VALUE="0">
        <PARAM NAME="FromPage" VALUE="0">
        <PARAM NAME="HelpCommand" VALUE="0">
        <PARAM NAME="HelpContext" VALUE="0">
        <PARAM NAME="HelpFile" VALUE="">
        <PARAM NAME="HelpKey" VALUE="">
        <PARAM NAME="InitDir" VALUE="">
        <PARAM NAME="Max" VALUE="0">
        <PARAM NAME="Min" VALUE="0">
        <PARAM NAME="MaxFileSize" VALUE="260">
        <PARAM NAME="PrinterDefault" VALUE="1">
        <PARAM NAME="ToPage" VALUE="0">
        <PARAM NAME="Orientation" VALUE="1">


Hi All

I have created a Com AddIn in VC++ (ATL & MFC) using Visual Studio 2005 for MS Outlook 2003 & MS Outlook 2007, I have implemented IdtExtensibility2 Interface into it, it is a COM Dll and it registers with the help of Regsvr32.exe and it is displayed as a button in the command bar of MS Outlook, this component is working fine on windows XP operating system along with MS Outlook 2003 and MS Outlook 2007.

But on trying to register the Plug-In (Com Dll) at windows vista it is producing error and not registers on windows vista, so please suggest the reason why it is not registers on windows vista and what implementation is required so that the plug-in works fine on Windows Vista, Windows 7 and windows XP(already working fine on windows XP).




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure