Results 1 to 6 of 6

Thread: Panel Double Bufferring Problem

  1. #1

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Panel Double Bufferring Problem

    I used advice from this site to set the DoubleBuffering property of a Panel to true.

    http://vijirajkumar.blogspot.com/201...-to-avoid.html

    However, I don't see my new control in my toolbox. To get by I have drawn regular panels in my designer window and then altered the designer file to my new class. This causes headaches though when the designer doesn't open correctly (sometimes it works, other times I get a "variable is undeclared, unassigned error)..

    How do I get a simple custom control into my toolbox?
    Intermediate Level Programmer Extraordinaire

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

    Re: Panel Double Bufferring Problem

    If you add a component to your project then that component (a control is specialised component) will be available automatically in the Toolbox for all compatible projects in that same solution. For any other solution, your component is no different to any other, i.e. you must add it to the Toolbox explicitly by selecting the DLL it is declared in.
    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

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Re: Panel Double Bufferring Problem

    Thanks. I'm partially there, but there's still a problem.

    When I wrote this code (for the double buffered panel) I put it in a module so I could get at it globally. I never used the "add" option after right clicking the project name in the solution explorer. That must have been why it never appeared in the toolbox. Chalk that up to inexperience.

    I have just added the custom control in the form of a class that inherits Panel. Now it appears in my toolbox and I can draw it using the designer (and it's double buffered). However, when I build my project I get the error "The variable 'DoubleBufferPanel1' is either undeclared or was never assigned." for each of the panels I drew in the designer. Something still isn't synching correctly.
    Intermediate Level Programmer Extraordinaire

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Panel Double Bufferring Problem

    i've seen this before.
    if you run your project then stop it, close the form then reopen it you should see your controls

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

    Re: Panel Double Bufferring Problem

    Quote Originally Posted by .paul. View Post
    i've seen this before.
    if you run your project then stop it, close the form then reopen it you should see your controls
    In theory, that shouldn't be necessary and I've never seen it required but that doesn't mean that it isn't on some occasions on some systems. All that you should need to do is build the project that contains the component for it to be automatically available for that solution. If I see some odd behaviour in a project though, I would already have at least restarted VS and, if that didn't work, restarted my machine before I would even consider posting on a forum. I would hope that everyone else would do the same.
    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

  6. #6

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Re: Panel Double Bufferring Problem

    (rolls eyes) Is there anyone else there who can help me out without the sanctimony?
    Intermediate Level Programmer Extraordinaire

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