| | |
redrawing panel
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 27
Reputation:
Solved Threads: 0
Well this are the results:
The sizechanged event wasn't good because it was only working when i manually changed the form size.In other cases it didn't fired.
The Form_paint event was a cure for my problem.It he fired when i minimized or maximized the form and also when i opened some other window on top of my form so this was the solution of my problem
Thanks for your help!!!!
The sizechanged event wasn't good because it was only working when i manually changed the form size.In other cases it didn't fired.
The Form_paint event was a cure for my problem.It he fired when i minimized or maximized the form and also when i opened some other window on top of my form so this was the solution of my problem
Thanks for your help!!!!
•
•
Join Date: Jul 2008
Posts: 27
Reputation:
Solved Threads: 0
Well one more thing.This is just from curiosity.As i have seen the formPaint_event is firing on almost anything.I have tried to find an explanation on the msdn and it says the event is firing every time the control is redrawn.But when is it redrawn.
I thought that this event is firing only the first time the control is created but it looks it isn't so!!!!
I thought that this event is firing only the first time the control is created but it looks it isn't so!!!!
•
•
Join Date: Jan 2009
Posts: 21
Reputation:
Solved Threads: 7
The form is redrawn when any portion of the form object is required to be drawn. This could be from another window moving over the form or a focus/minimize/maximize. It would depend on the application. You can add a simple counter, sort of like the example I gave, to see how many times it's being fired in a given situation. This value may be different in Remote Desktop environments, I have not tested that.
ddanbe, it could be that the window is being unfocused and refocused by the windows environment. Each one causes a Paint event to fire. Perhaps it quickly does it and you see those results. In my current test environment, I consistently see three events at startup, and then from there it varies depending what I do.
ddanbe, it could be that the window is being unfocused and refocused by the windows environment. Each one causes a Paint event to fire. Perhaps it quickly does it and you see those results. In my current test environment, I consistently see three events at startup, and then from there it varies depending what I do.
![]() |
Other Threads in the C# Forum
- Previous Thread: Config.xml
- Next Thread: Advantages of C# over C++
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum equation event excel file form format formatting forms function gdi+ httpwebrequest image index input install interface java label list listbox mandelbrot math mouse mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remote remoting resource restore richtextbox server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation visualstudio wait webbrowser windows winforms working wpf xml





