MSFlexGrid in VS2005

vnaga

New member
Joined
Sep 13, 2006
Messages
3
Programming Experience
3-5
Hi, I´m having a problem with a VB project wich I tried to convert
from VS2003 to VS2005. The main problem is the MSFlexGrid
Control, in VS2005 I can´t see the design of the forms and
when I tried to run, it shows an error message "class not
registered".

I added the reference for the AxMsFlexGrid, the
AXInterop.MSFlexGridLib.dll, but the same problem persists.

Now, the project failed to run in VS2003 too (the original version),
it seems that the VS2003 do not recognize the library
AXInterop.MSFlexGridLib.dll anymore.
But everything was ok before installing the VS2005.

May I have the both versions installed? It may cause some conflict
problems? The MSFlexGrid does not exist in VS2005 anymore?

Please, help me. Thank you!!!
 
You shouldn't be using the FlexGrid at all anyway. You really should use the DataGridView, which is not perfect but is very, very functional.

I'd guess that your problem is if you've directly added a reference to an existing AxInterop DLL. That's a no-no. If you've done that then it is probably a .NET 1.1 version. What you do with COM components is add a reference to the component itself and the IDE will create the appropriate interop library for you. With ActiveX controls its even easier because you don't even have to add a reference at all. You just add the control to the IDE Toolbox and then add it to a form like any other control. The IDE will add the reference and create the required libraries.

Let me reiterate though: don't use the MSFlexGrid in .NET 2.0 apps.
 
I agree that you might want to look into a alternative besides flexgrid, but I did run into a similiar issue previosly with another control. I am not sure if it is a glitch in the system or what, but to resolve, I needed to open a form that had my control on it, then drag the control on it again (Don't know why this was necessary). This then re-registered the reference solving the issue on every other form in my project minus the one that I just dragged the control on. From thispoint I ended up deleteing the original control from the code (Make sure you remove all instances in the code that declare the old control, and then once that is done, I re-named the new dragged on control to the same name the other was using. This is a sloppy work around, but it did solve my issue. I hope it helps.
 
Thanks a lot for your nice replies.
I really want to discard the MSFlexGrid from my
project because of the many problems I had until
now with .NET 2.0.

What you do with COM components is add a reference to the component itself and the IDE will create the appropriate interop library for you.

One more question, how can I do when the component do not appears
on the Add Reference window and I just don´t know if it exists or not and
where it is located?

Thank you.
[]s
 
ALL COM components have to be registered. All registered COM components appear on the COM tab of the Add Reference dialogue. If a component does not appear in that list then you can't use it.
 
Back
Top