VS 2008 DataVisualization-VBForums
Results 1 to 4 of 4

Thread: DataVisualization

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Location
    Perth, Australia
    Posts
    99

    DataVisualization

    Can anyone tell me the reason why I can access

    System.Windows.Forms.DataVisualization.Charting.Utilities within C#, but not VB?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    88,601

    Re: DataVisualization

    Have you added the appropriate reference to your VB project? C# and Vb code can access EXACTLY the same types. They can each access any type declared in any assembly that you reference. I would assume that that refernce would normally be added for you when you add a chart control to your form.

    2007-2014

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Location
    Perth, Australia
    Posts
    99

    Re: DataVisualization

    I was aware of them being able to access the same types, which is why I am confused.

    If I start a new Windows App Form in C# and VB and add the
    System.Windows.Forms.DataVisualization.Charting.Utilities reference, to both, I can see the Utilities, 3DBorder etc Namespaces in C#, but in VB, I have nothing.

    Perhaps I have missed something fundamental out. Will go back and try again.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    88,601

    Re: DataVisualization

    That namespace may not be listed on the References page but that doesn't mean that you can't access it. You can add your own imports on the References page or you can import at the file level. If you do that you'll be presented with an error message telling you that the namespace has no public members, which is why you aren't shown it in the first place. If you type out that namespace in C# code and then add a dot you'll get no help from Intellisense for the very same reason: there are no members to access.

    This all begs the question: why are you trying to make use of the namespace when it doesn't contain anything you can use?

    2007-2014

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.