|
-
Dec 24th, 2011, 10:12 AM
#1
Thread Starter
Hyperactive Member
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 
-
Dec 24th, 2011, 10:57 AM
#2
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.
-
Dec 24th, 2011, 02:12 PM
#3
Thread Starter
Hyperactive Member
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 
-
Dec 24th, 2011, 02:20 PM
#4
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
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 24th, 2011, 07:44 PM
#5
Re: Panel Double Bufferring Problem
 Originally Posted by .paul.
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.
-
Dec 24th, 2011, 08:56 PM
#6
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|