Click here to Skip to main content
15,900,906 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: adding a panel to a form. Pin
bimbambumbum22-Sep-10 17:04
bimbambumbum22-Sep-10 17:04 
AnswerRe: adding a panel to a form. Pin
Luc Pattyn22-Sep-10 17:13
sitebuilderLuc Pattyn22-Sep-10 17:13 
GeneralRe: adding a panel to a form. Pin
bimbambumbum25-Sep-10 4:46
bimbambumbum25-Sep-10 4:46 
GeneralRe: adding a panel to a form. Pin
Luc Pattyn25-Sep-10 5:21
sitebuilderLuc Pattyn25-Sep-10 5:21 
GeneralRe: adding a panel to a form. [modified] Pin
bimbambumbum25-Sep-10 5:31
bimbambumbum25-Sep-10 5:31 
GeneralRe: adding a panel to a form. Pin
Luc Pattyn25-Sep-10 6:08
sitebuilderLuc Pattyn25-Sep-10 6:08 
GeneralRe: adding a panel to a form. [modified] Pin
bimbambumbum25-Sep-10 11:20
bimbambumbum25-Sep-10 11:20 
GeneralRe: adding a panel to a form. Pin
Luc Pattyn25-Sep-10 12:02
sitebuilderLuc Pattyn25-Sep-10 12:02 
There is nothing much special about the panel, except it should be a DoubleBufferedPanel.
I know of three ways to get it on the Form:

1.
make sure that class is already compiled (maybe in a separate DLL) and you can design it in with Visual Designer. This is the official approach.

2.
or add a Panel with Visual Designer, close the Form, and edit the form.designer.cs file changing new Panel() into new DoubleBufferedPanel()
(not recommended, one isn't supposed to edit a designer file)

3.
or add a Panel with Visual Designer, and have it replaced at run-time. That is what I did, like so, in the Form's constructor.
Panel oldPlot=plot;
plot=new DoubleBufferedPanel();
plot.Bounds=oldPlot.Bounds;
Controls.Remove(oldPlot);
Controls.Add(plot);
plot.Paint+=plotter;

The disadvantage is you have to copy all Designer properties/events from the old to the new Panel.

The alternative is to leave the Panel, and turn it into a double-buffered one by setting some ControlStyles (the DoubleBuffered property being protected cannot be modified).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionsqlDataAdapter doest not refresh the query Pin
akosidandan22-Sep-10 5:20
akosidandan22-Sep-10 5:20 
AnswerRe: sqlDataAdapter doest not refresh the query Pin
Not Active22-Sep-10 7:42
mentorNot Active22-Sep-10 7:42 
GeneralRe: sqlDataAdapter doest not refresh the query Pin
akosidandan22-Sep-10 22:40
akosidandan22-Sep-10 22:40 
GeneralRe: sqlDataAdapter doest not refresh the query Pin
Not Active23-Sep-10 1:08
mentorNot Active23-Sep-10 1:08 
QuestionHow to Show Specific Records in listview Pin
akosidandan22-Sep-10 1:38
akosidandan22-Sep-10 1:38 
AnswerRe: How to Show Specific Records in listview Pin
Luc Pattyn22-Sep-10 2:23
sitebuilderLuc Pattyn22-Sep-10 2:23 
GeneralRe: How to Show Specific Records in listview Pin
akosidandan22-Sep-10 2:29
akosidandan22-Sep-10 2:29 
GeneralRe: How to Show Specific Records in listview Pin
Luc Pattyn22-Sep-10 2:47
sitebuilderLuc Pattyn22-Sep-10 2:47 
QuestionFile recovery Pin
hammerstein0522-Sep-10 0:57
hammerstein0522-Sep-10 0:57 
AnswerRe: File recovery Pin
Pete O'Hanlon22-Sep-10 1:37
mvePete O'Hanlon22-Sep-10 1:37 
GeneralMessage Removed Pin
22-Sep-10 4:23
molesworth22-Sep-10 4:23 
GeneralRe: File recovery Pin
Pete O'Hanlon22-Sep-10 4:35
mvePete O'Hanlon22-Sep-10 4:35 
GeneralRe: File recovery [modified] Pin
molesworth22-Sep-10 4:38
molesworth22-Sep-10 4:38 
AnswerRe: File recovery Pin
molesworth22-Sep-10 4:48
molesworth22-Sep-10 4:48 
GeneralRe: File recovery Pin
hammerstein0522-Sep-10 5:39
hammerstein0522-Sep-10 5:39 
Question.NET code protection Pin
cherrymotion21-Sep-10 23:09
cherrymotion21-Sep-10 23:09 
AnswerRe: .NET code protection Pin
Kubajzz22-Sep-10 3:44
Kubajzz22-Sep-10 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.