Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 VB 2005 CLS-Compliance Errors

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
quinncurtis Posted - 27 Feb 2006 : 13:29:11
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.
3   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 05 Aug 2006 : 15:24:35
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.

quinncurtis Posted - 06 Mar 2006 : 17:18:29
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.


quinncurtis Posted - 01 Mar 2006 : 11:17:31
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.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07