| | |
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 asp.net barchart bitmap box broadcast buttons c# check checkbox client color combo combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees developer development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql nargalax operator path photoshop picturebox pixelinversion post programming radians regex remote remoting restore richtextbox save saving serialization server sleep socket sql stack statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





