redrawing panel

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jul 2008
Posts: 27
Reputation: nikola.rosic is an unknown quantity at this point 
Solved Threads: 0
nikola.rosic nikola.rosic is offline Offline
Light Poster

Re: redrawing panel

 
0
  #11
Jan 27th, 2009
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!!!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 27
Reputation: nikola.rosic is an unknown quantity at this point 
Solved Threads: 0
nikola.rosic nikola.rosic is offline Offline
Light Poster

Re: redrawing panel

 
0
  #12
Jan 27th, 2009
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!!!!
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 21
Reputation: nelis is an unknown quantity at this point 
Solved Threads: 7
nelis nelis is offline Offline
Newbie Poster

Re: redrawing panel

 
0
  #13
Jan 27th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC