Disabling Forms Redrawing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I have a problem. I have a control and I want to try if a specific value of one property can be setted, without catching exception. So I set the value and then I restore the previuos value. Anyone know how to prevent that the control redraw between this two operations, to prevent image flickering?
 
this.SuspendLayout();

//.....

this.ResumeLayout();


mevar said:
Hello. I have a problem. I have a control and I want to try if a specific
value of one property can be setted, without catching exception. So I set
the value and then I restore the previuos value. Anyone know how to prevent
that the control redraw between this two operations, to prevent image
flickering?
 
Hi mevar,
There is not managed solution that works in all of the cases.
Some controls like ListBox, ListView, TreeView and ComboBox have their own
way to stop updating the control. This can be done using the method pair
BeginUpdate/EndUpdate.

However there is no method that works with all of the controls.

I said there is no managed solution because you can send WM_SETREDRAW
message to the controls window and in this way stop/resume painting the
control.


--
HTH
B\rgds
100

mevar said:
Hello. I have a problem. I have a control and I want to try if a specific
value of one property can be setted, without catching exception. So I set
the value and then I restore the previuos value. Anyone know how to prevent
that the control redraw between this two operations, to prevent image
flickering?
 
* "=?Utf-8?B?bWV2YXI=?= said:
Hello. I have a problem. I have a control and I want to try if a
specific value of one property can be setted, without catching
exception. So I set the value and then I restore the previuos
value. Anyone know how to prevent that the control redraw between this
two operations, to prevent image flickering?

<http://groups.google.de/[email protected]>
 
Back
Top