Results 1 to 4 of 4

Thread: A question about classes

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    26

    A question about classes

    I have a form with a grid linked to a SQL table and INSERT/DELETE/SAVE/UPDATE buttons.How can i make a class so that everytime i want to make a new project,form use the that grid?

    if you have some samples with such grid i would be in dept to you.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: A question about classes

    You've already made a class. If you want to be able to use it in multiple projects then compile it into a class library, i.e. DLL. You can then reference that library in other projects just as you reference the Framework libraries.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: A question about classes

    More specifically, you probably are looking to make a user control. It should be in your projects list when you create a new project in Visual Studio.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: A question about classes

    Ah, I read that as wanting to use the same form rather than the same grid. Go with what the frog says. He looks trust-worthy enough.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    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
  •  



Click Here to Expand Forum to Full Width