Nianzhu Luo

I made a program with Visual Basic 2005 Express Edition. In the program, there are a few forms using DirectX components "MSChart". The program runs great in both my desktop and laptop. When I installed it to other computers (computers without VB 2005), It only works on the forms without DirectX components. When it tries to open the form with DirectX components, the following error appears:

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) --->

What should I do to make it work




Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

ReneeC

There are going to be machnes that don't have mschart on them. You are going to have to find out if MSChart is licensed for distribution. If it is you are going to have include it in your publication and register it.

I don't think you can accomplish that in One-Click.






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Nianzhu Luo

I made a program with VB 2005. It runs well on both my computers. When I installed to other computer in the company, it works only on forms without DirectX and math calculations. After I installed VB5.0 to that computer, it works fine. I do not want to install VB5.0 on every computer in order to run the program. Here is the error message:

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) --->

I desperately need somebody to help me. Time is running out.






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Chris Dunaway

It appears as if your program uses some COM objects to do its work and those COM objects were not properly registered on the target computer.

Since you stated that DirectX forms and math calculations are the ones that do not work, perhaps the target computer does not have the correct version of DirectX installed

Without more detail, it's difficult to diagnose the problem.

Chris





Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Nianzhu Luo

Thanks, Chris,

The only DirectX componnent I used in the form is MSCHART. In the declaration, I have the following:

Imports AxMSChartLib.AxMSChart

Imports MSChartLib

In the main program:

AxMSChart1.ChartData = Chartpoints_1

AxMSChart1.chartType = VtChChartType.VtChChartType2dXY

AxMSChart1.ShowLegend = True

AxMSChart1.Title.Text = " FLOW vs. SPOOL STROKE"

AxMSChart1.Plot.Axis(VtChAxisId.VtChAxisIdY).AxisTitle.VtFont.Size = 10

AxMSChart1.Plot.Axis(VtChAxisId.VtChAxisIdY).AxisTitle.Text = "DESIRED FLOW (L/min)"

AxMSChart1.Plot.Axis(VtChAxisId.VtChAxisIdX).AxisTitle.VtFont.Size = 10

AxMSChart1.Plot.Axis(VtChAxisId.VtChAxisIdX).AxisTitle.Text = "SPOOL STROKE*10 (mm)"

AxMSChart1.Legend.VtFont.Size = 10

AxMSChart1.Legend.Location.LocationType = VtChLocationType.VtChLocationTypeBottomLeft

AxMSChart1.Plot.Axis(VtChAxisId.VtChAxisIdY).AxisScale.type = VtChScaleType.VtChScaleTypeLinear

AxMSChart1.Plot.Axis(VtChAxisId.VtChAxisIdX).AxisScale.type = VtChScaleType.VtChScaleTypeLinear

AxMSChart1.Plot.UniformAxis = False

AxMSChart1.ColumnCount = 4

AxMSChart1.ColumnLabelCount = 2

AxMSChart1.ColumnLabelIndex = 1

AxMSChart1.Column = 1

AxMSChart1.ColumnLabel = "Desired Inlet to Work Flow"

AxMSChart1.Column = 3

AxMSChart1.ColumnLabel = "Desired Work to Tank Flow"

AxMSChart1.Visible = True

It works fine when the target computer has VB5.0 or VB6.0. It seems the target computer needs a license for MSCHART. How can I put license in the program






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

ReneeC

Nianzhu,

Those are not the questions I'd be asking. I'd be asking

1.) Will Microsoft license this control for you to deploy

2.) How much will it cost per system






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Nianzhu Luo

Thanks. I am trying to find out if the MSCHART is a licensed component. I cannot find it.




Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Martin Xie - MSFT

Hi Nianzhu,

MSChart control gets installed with MS Office.

It locates at c:\windows\system32\mschrt20.ocx.

Please include it in your application and register it as Renee said.

regsvr32.exe mschrt20.ocx

"When I installed it to other computers (computers without VB 2005)"

If not help, try this trick:

Find vbctrl.reg file from VB6 installation disk (search for *.reg) , and then double click it to import to Registry.

Check this thread about Using MSChart Control.

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2279458&SiteID=1

Regards,

Martin






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Nianzhu Luo

Thanks, Renee,

I bought VB 5.0 a few years ago. It has the rights to deploy the control. The program I am working on is actually an upgrade of the previous verion. Now, I rewrite it using VB 2005 express edition. I do not know if there is a way to transfer license information in VB 5.0 to the new program. Or, if VB 2008 professional has the rights to deploy "MSCHART", I can ask company to buy it.






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Martin Xie - MSFT

Merged the two threads which have the same topic, so all information about this problem will be in the same location.




Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Martin Xie - MSFT

Hi Nianzhu,

Please check this KB article for detailed solutions.

http://support.microsoft.com/kb/318597/en-us

Visual Studio 2005 and Visual Studio .NET do not install the license information for Visual Basic 6.0 ActiveX controls unless the Visual Basic 6.0 controls are installed. This behavior may occur if Visual Basic 6.0 was never installed on the computer.

SYMPTOMS

When you use Microsoft Visual Basic 6.0 ActiveX controls in Microsoft Visual Studio 2005 or in Microsoft Visual Studio .NET, you may experience the following problems:

?

When you try to add an ActiveX control that was included with Visual Basic 6.0 to a form in Visual Studio 2005 or in Visual Studio .NET, you receive the following error message:

You do not have a license to use this ActiveX control.

You can add the control to the toolbox successfully, but you receive this error message when you add the control at design time.

CAUSE

You must have a design-time license to use Visual Basic 6.0 ActiveX controls. These errors occur because the system registry does not contain the design-time license information. When you upgrade a project that contains Visual Basic 6.0 ActiveX controls, or when you try to use Visual Basic 6.0 ActiveX controls on a form in Visual Studio 2005 or in Visual Studio .NET, those controls must be installed and licensed on the target system.

Visual Studio 2005 and Visual Studio .NET do not install the license information for Visual Basic 6.0 ActiveX controls unless the Visual Basic 6.0 controls are installed on the computer that is running Visual Studio 2005 or Visual Studio .NET. This behavior may occur if Visual Basic 6.0 was never installed on the computer.

You do not receive these errors on a computer on which both Visual Basic 6.0 and Visual Studio 2005 or Visual Studio .NET are installed because Visual Basic 6.0 installs the components and registers the licenses.

RESOLUTION

To resolve this problem, you must install the .ocx files for the ActiveX controls on the computer before you upgrade the project or before you use Visual Basic 6.0 ActiveX controls on a form in Visual Studio 2005 or in Visual Studio .NET. To do this, use one of the following methods:

?

Install Visual Basic 6.0 on the computer that is running Visual Studio 2005 or Visual Studio .NET.

?

Add the licensing keys to the registry.

Kind regards,

Martin






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Nianzhu Luo

Thank you very much, Martin,

You are right. I only have problems with those computers never been installed VB 5.0 or 6.0. I followed your instruction to add the license keys to the registry by double click the VBCTRLS.REG file on the VB 5.0 installation disk. The following four warnings appears on my program:

'requiredRuntime'. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regsvcs.exe.config 4 10 Miscellaneous Files
Message 11 Could not find schema information for the attribute 'version'. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regsvcs.exe.config 4 68 Miscellaneous Files
Message 9 Could not find schema information for the attribute 'safemode'. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regsvcs.exe.config 4 26 Miscellaneous Files
Message 10 Could not find schema information for the attribute 'imageVersion'. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regsvcs.exe.config 4 42 Miscellaneous Files

Here is my regsvcs.exe.config file in my program:

< xml version ="1.0" >

<configuration>

<startup>

<requiredRuntime safemode="true" imageVersion="v2.0.50727" version="v2.0.50727"/>

</startup>

</configuration>


Do I miss something in the program How can I correctly in stall the license information at design time

Thanks again.

Nianzhu






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Martin Xie - MSFT

When you add the license keys to the registry by double clicking the VBCTRLS.REG file on the VB 5.0 installation disk, if you ignore these warning messages, can the MSChart ActiveX control work fine on other computers I'm not sure if the approach is applied to VB5 too, besides VB6 Would you please send the VBCTRLS.REG file on the VB 5.0 installation disk to me: v-maxie@microsoft.com

http://support.microsoft.com/kb/318597

Method 2: Add the licensing keys to the registry

1. Insert the Visual Studio 2005 or Visual Studio .NET Installation Disk that has the \Extras\VB6 Controls folder.

2. Click Start, and then click Run.
3. In the Run dialog box, type regedit, and then click OK.
4. In the Registry Editor dialog box, click Import on the File menu.
5. Locate the \Extras\VB6 Controls folder on the Installation CD-ROM, select the VB6Controls.reg file, and then click Open. This step inserts all of the Visual Basic 6.0 ActiveX Controls license keys in the registry.

About the error: Could not find schema information for the element

Please refer to the reply of Steven Cheng[MSFT].

Thanks,

Martin






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Nianzhu Luo

Thanks again, Martin,

"if you ignore these warning messages, can the MSChart ActiveX control work fine on other computers "

No, it deos not work on computers never installed VB 5.0. But, it works on any computer previously installed VB 5.0, and now VB5.0 is removed. I will send you the VBCTRLS.REG file from my VB 5,0 installation disk by email.

About method 2, I tried. Because I am using VB 2005 Express Edition, there is no \Extras\VB6 directory in my computer. I searched my computer. It cannot find the VB6Controls.reg file.

Regards,

Nianzhu






Re: Visual Basic Express Edition Forms with DirectX components do not work when installed to other computer

Martin Xie - MSFT

Dear Nianzhu,

I'm glad to hear from you. But the VBCTRLS.REG file was filtrated by Microsoft Mail Server.

------------------------------------------------------------------------

FILE QUARANTINED

Microsoft IT has removed VBCTRLS.REG since it has been found to match the FILE FILTER= unnamed: <in>*.reg file filter.

------------------------------------------------------------------------

Fortunately, here are two suggestions for you to try:

1. You can download the vb6controls.reg file and import it to Registry.
http://www.irongeek.com/downloads/vb6controls.reg

2. Run regedit.exe on a machine which has installed VB5 or VB6 and export from the HKEY_CLASSES_ROOT\Licenses node in Registry to a .reg file (e.g.Licenses.reg), then import it to a destination machine which has not installed VB5 or VB6.

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Have a nice day!

Martin