Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2006

Tip: Looking for answers? Try searching our database.

Using Microsoft Chart Control in dotnet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Dankert - 14 Jul 2006 17:14 GMT
I am trying to use the Microsoft Chart Control COM component in dotnet 2.0
but keep getting "class not registered" exceptions when I try to run the
code.  I have done the following so far to try and get around this issue:

- registered mschart20.ocx using "regsvr32 mschrt20.ocx"
- registered AxInterop.MSChart20Lib.dll using regasm
- registered Interop.MSChart20Lib.dll using regasm
- reinstalled Office Web Components 2003

Unfortunately, none of these has made any difference.  More or less, I am
doing the following with my code:
- create new project
- add Microsoft Chart Control 6 reference (listed in COM object list)
- drag a Microsoft Chart Control 6.0 (SP4)(OLEDB) to my form
- Try to run the code - class not registered exception is thrown every time

Does anyone have any ideas?

Using DotNet 2.0 with VS 2005 on Windows XP 64-bit currently.

Bob Dankert
Linda Liu [MSFT] - 17 Jul 2006 10:54 GMT
Hi Bob,

Thank you for posting.

I have performed a test according to your steps, but I didn't reproduce the
problem you described.The OS on my machine is Windows XP Professional  2002
SP2.

You have mentioned that you registered mschart20.ocx using "regsvr32
mschrt20.ocx". Do you succeed in it?

If you have install VB6 in your machine, you may have a test  to see if the
problem exists in VB6. If the problem still exists in VB6, it seems that
the problem may be related to the ActiveX control file or its dependency
files. You may use "depends" tool to see whether all the dependency files
of the ActiveX file exist on your machine and the version of these files
are correct.  If the result is No, you may copy the absent dlls to your
machine.

To use this tool, go to Start menu ->All Programs-> VS .NET2005-> Microsoft
Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt.
In the command prompt, type "depends" command and press enter. In the
Dependency Walker window, open the mschrt20.ocx.  

Hope this helps.
Please try my suggestion and let me know the result.

Sincerely,
Linda Liu
Microsoft Online Community Support

============================================================================
=============================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

============================================================================
=============================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Bob Dankert - 17 Jul 2006 22:36 GMT
In answer to your questions:

- When I ran "regsvr32 mschrt20.ocx", this did indeed succeed.  I registered
this file by going to the c:\windows\syswow64\ folder and running the
command mentioned.
- I created a VB6 project and this worked without any problems
- Per the "depends" tool, see the following paragraph.

After running the Dependency Walker tool on the MSCHRT20.OCX file in the
C:\Windows\SysWow64\ folder I found that there are two files which can not
be found.  These files are DEVMGR.DLL and DWMAPI.DLL, and the message for
both is "Error opening file.  The system cannot find the file specified
(2)."  In regards to DEVMGR.DLL, this file resides in my C:\Windows\System32
folder and for good measure I registered the module using regsvr32 (this
succeeded) and ran Dependency Walker again and this module still can not be
found.  In regards to DWMAPI.DLL, I do not have this file anywhere any
folder within C:\Windows and am not sure where this is supposed to be.

I wonder if this is perhaps all related to the Windows XP 64-bit operating
system?  I tested the same thing on another development computer in my
office which is also running XP 64-bit with VS.Net 2005 and this computer
had the exact same problem.

I appreciate the help and look forward to your additional suggestions!

Bob

> Hi Bob,
>
[quoted text clipped - 48 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Linda Liu [MSFT] - 20 Jul 2006 14:03 GMT
Hi Bob,

Thank you for your response.

I think you may have a try copying the DEVMGR.DLL file from
C:\Windows\System32 folder to the C:\Windows\SysWow64\ folder, search and
download the DWMAPI.DLL on google and move it to the C:\Windows\SysWow64\
folder.

Then unregister the mschrt20.ocx and register this OCX file again.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support
Linda Liu [MSFT] - 24 Jul 2006 11:27 GMT
Hi Bob,

How is it going with the problem?

If the problem is not resolved or you have anything unclear, please feel
free to post in the newsgroup and we will follow up.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support
Bob Dankert - 25 Jul 2006 21:59 GMT
Linda,

I was able to get the software to work after a lot of tweaking.  After using
it, I have decided to go with a different Chart control which I beleive will
suite my needs better.  Thanks for helping to get this working!

Bob
> Hi Bob,
>
[quoted text clipped - 8 lines]
> Linda Liu
> Microsoft Online Community Support
Linda Liu [MSFT] - 26 Jul 2006 06:12 GMT
Hi Bob,

Thank you for your response. I am very glad to hear that you have solved
the problem.

If you have any other questions in the future, please don't hesitate to
contact us. It's always our pleasure to be of assistance.

Have a nice day!

Sincerely,
Linda Liu
Microsoft Online Community Support
contact@softwaresigloxxi.com - 10 Aug 2006 18:43 GMT
Try Super 2d/3d Graph Library at http://www.softwaresigloxxi.com. Its
shareware.

Bob Dankert ha escrito:

> I am trying to use the Microsoft Chart Control COM component in dotnet 2.0
> but keep getting "class not registered" exceptions when I try to run the
[quoted text clipped - 17 lines]
>
> Bob Dankert

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.