Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installation problem in Windows 7

Status
Not open for further replies.

sduraiappa

Programmer
Mar 5, 2004
54
IN
I have VB 2008 project and I have developed it in Windows XP. I have installed in many nodes using Windows XP and working fine.

I tried to install this application in my MD's laptop having Windows 7. I got the following error message:

"System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()'

I understand this problem is due to OCX file not registered issue. I copied the MSDATGRD.OCX, MSFLXGRD.OCX and MSHFLXGD.OCX files in windows\wowsys64\ folder and register it.

But still i have the same problem.

Please help me as it is urgent.

Thanks in advance.

S.Duraiappan
 
How do you mean "and register it"? What steps did you actually take? Another question would also be why use com objects rather than .Net? Do you absolutely need whatever differences there are in the controls? Many of the controls are interdependent are you sure you have all of the files require? I've never seen a list of all the dependencies so I couldn't guess if you are missing something. Microsoft did that purposefully to try to help prevent the very thing you are doing.

I don't know if this is worth a shot:
-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Thanks for your reply.

I am using MSFLEXGRID control in my forms and i understand that MSFLXGRD.OCX has to be registered seperately (regsvr32 msflxgrd.ocx). I do this in Windows XP machines also.

While getting error in Windows 7 machine, I register MSFLXGRD.OCX by "regsvr32 msflxgrd.ocx" with administrative priveledges. MSFLXGRD.OCX is registered successfully.

On reading your reply, i could understand that i may have missed registering some other OCX files. I will check that.

Is there any other alternative for MSFLEXGRD in VB.Net?

S.Duraiappan.
 
It has been a long time since I've used a FlexGrid so I would need to know why you use one. My first thing to say would be use a Bound or Unbound DataGridView. You should be able to do anything you want to do with it.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Thanks Sorwen.

I will try Datagrid.

But whats the way to use Flexgrid in Windows 7?

S.Duraiappan
 

Try targeting your application to x86 CPUs, which will force the app to run as 32-bit. Go to Project->(ProjectName) Properties->Compile->Advanced Compile Options and set Target CPU to x86.

When the target CPU is set to Any CPU it will run the application as 64-bit when on a 64-bit OS. The FlexGrid is 32-bit, and cannot be accessed from a 64-bit application.


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Jebenson,

I tried your option to change the target CPU. I have only option (ANY CPU) in the compile option screen. I could not find the option mentioned by you in 'advance compile' option.

Please help me.

S.Duraiappan.
 
Are you using Visual Basic 2008 Express? If so, you cannot set the target CPU, as you need the full version of Visual Studio for that.


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
I am using Microsoft Visual Studio 2008 Express Edition.

I find this x86 option in Configuration manager in Build menu.

I have added a new platform x86 and rebuild the application.

I will install the new code in my MD's laptop and update the result soon.

Thanks,

S.Duraiappan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top