0

Im a beginner programmer for Visual Studio 2005 and coding in VB and i required some help.

I've been hitting this error everytime i call InitializeComponent() :

ComException was unhandled Class not registered (Exception from HRESULT : 0x80040154 (REGDB_E_CLASSNOTREG))

What does it mean ?? and how do I go by it ??

Thank You.

1 Answers1

0

It looks like the exception is occurring due to a component you are using in the application not being registered on the machine you are running it on.

I assume you are using an unmanaged COM library of some kind, possibly a control on your form?

If this is the case and you know which component it is you can use Regsvr32 to register it.

(Regsvr32 is the command-line tool that registers .dll files as command components in the registry)

To do so, open a command prompt window, navigate to the dll in question and run the following command regsvr32.exe filename.dll

If the above is not the case then please could you post the full exception / stacktrace to be analysed.

jdavies
  • 12,784
  • 3
  • 33
  • 33
  • Hi as attached should be the full exception /stacktrace http://imageshack.us/photo/my-images/217/classnotregistered.png/ Thanks. – Steven Tang Aug 26 '11 at 15:59
  • It looks from your exception that you are using an ActiveX control of some kind. It is likely that your control has not been registered with the OS. Check out the following article: [How to register an ActiveX control (.ocx) manually](http://support.microsoft.com/kb/146219/en-gb) – jdavies Aug 26 '11 at 16:15
  • hmmm but is there a way to find out which ActiveX control on the application is not registered ?? Thanks – Steven Tang Aug 27 '11 at 15:42