Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 VB 2005 CLS-Compliance Errors
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

quinncurtis

1551 Posts

Posted - 27 Feb 2006 :  13:29:11  Show Profile  Reply with Quote
There are issues trying to compile the VB example programs using Visual Studio 2005.

The demo programs all have ChartView derived classes that show up as not CLS-compliant because they derive from 'ChartView', which is not CLS-compliant.

Starting with VB 2005 (but not C# 2005), VB apparently requires CLS-compliant libraries by default. This can be partially accounted for by setting the CLSCompliant flag False in the projects AssemblyInfo file, as below.

<Assembly: CLSCompliant(False)>

Even when <CLSCompliant(False)>, as in the example above, the VB compiler will still complain if the program tries to use a protected member variable in a DLL has the same case insensitive name as a property in the same DLL. This shows up in some of the example programs. In every case an alternative property or method call can be used to accomplish the same thing.

By March 1, 2006 (US EST), you should be able to use your original download link(s) to download a new set of example programs that force the CLSCompliantFlag False, and avoid the methods that cause problems.

Check this thread for a confirmation.

quinncurtis

1551 Posts

Posted - 01 Mar 2006 :  11:17:31  Show Profile  Reply with Quote
The downloads have the modified demos, but there is still a problem with VB 2005. When you load the project files, the VB .Net 2005 project file converter is automatically invoked, converting our VB .Net 2001 projects to VB .Net 2005 projects. After that, you can build and run the examples OK. A problem arises if you then start resizing the main Form and our chart controls, at random. At some point VB just deletes all of the chart controls from the main form, no error given. Subsequent builds then give a list of error messages about missing variables.

If the projects are made from scratch using VB .Net 2005, and not run through the project converter, everything works as it should. This implies that there something going on in the converter that is making the project unstable. This is reinforced by the blog chatter about VB .Net 2005, and that it is still very unstable.

We will need to create a new batch of examples explicitly for VB .Net 2005 and add them to the standard install. This will take us until next week.
Go to Top of Page

quinncurtis

1551 Posts

Posted - 06 Mar 2006 :  17:18:29  Show Profile  Reply with Quote
We have reproduced all of the example programs explicitly for VS 2005, adding an examples2005 projects folder for the QCChart2D, QCRTGraph and QCSPCChart products. These examples were created with Visual Studio 2005 and don't contain the unknown errors that Visual Studio 2005 introduces into the original example programs when run through the VS 2005 converter.

If you need to convert your own programs from VS 2001 or VS 2003 -> VS 2005, we found that deleting and reinserting the controls works 100% of the time. Follow the following steps.

1: Convert the project using the VS 2005 project converter that is automatically invoked when you load a project created with an earlier version of VS.

2. Before you do anything else, Build the program to rebuild the ChartView derived controls in the project.

3. Delete all of the Quinn-Curtis ChartView derived controls from the main form and remove any event code (Form Load events usually) from the program.

4. Reinsert the ChartView derived controls back to the original positions on the main form. Re-hookup any event code that you want to use to initialize the chart.

5. Build the project.


Go to Top of Page

quinncurtis

1551 Posts

Posted - 05 Aug 2006 :  15:24:35  Show Profile  Reply with Quote
August 5, 2006 - We have made all of the .Net libraries CLS-compliant, so it is no longer necessary to have a separate examples folder for Visual Studio 2005 VB examples. Even though the projects for the examples are still in Visual Studio .Net 2002 format, they will all load into and automatically convert into the projects for VS 2003 and VS 2005. ALWAYS build the project before you try and view the projects main Form1 in the Form designer. The graphics controls placed on the form are part of the project and need to be compiled before they viewed on the form.

Most of the changes in the libraries involved making member variables internal (not directly accessible outside of the library), and adding new public properties to permit modifying the the member variables indirectly. If you were accessing any protected member variables of our classes directly (i.e. not through the associated property), you made need to modify you program to use the associated property instead. This usually involves just changing the first letter of the member variable from lower-case to upper case.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07