Refresh() and Invalidate()

Tech-Archive recommends: Speed Up your PC by fixing your registry



two questions:
1. what's the difference with user drawn control? if i call Invalidate() without specifying region isn't that the same as Refresh()? what's the difference "inside" the framework? does this two methods are handled in a different way?


2. why Invalidate() is not immediate? i had few situations when i needed to force redrawing of a user drawn control and when i called Invalidate nothing happend. putting Refresh() in the same place instead of Invalidate() did the trick. what may be the reason? because of that i do not use Invalidate() at all, but lately when i came across bob powell site i noticed that he is using (probably) only Invalidate(). why?
.




Relevant Pages

  • Re: Refresh() and Invalidate()
    ... Calling Refresh after an Invalidate call shouldn't cause your control to ... What I would expect to see is one Paint event (which means ... From MSDN's docs about Refresh: ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Refresh() and Invalidate()
    ... paint twice. ... So your control's entire client area would be invalidated, and since that would contain any region you passed to Invalidate, your Paint event would show the whole client area as invalid. ... Given what Refresh does, calling Invalidate and then immediately calling Refresh - regardless of whether you pass a region to Invalidate or not - is unnecessary; calling Refresh will get you there. ... Note that Refresh also causes a redraw of all child controls, which is an important distinction from Invalidate ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Graphics 102 : regional refresh of form/control
    ... method called Invalidate() that let's me invalidate any rectangular region of the Control. ... Does drawing a graphic (ala the Graphics class, for example the use of DrawLine()) automatically invalidate the graphic object's region? ... I then made it so the Refresh() method of the form was called for each graphic object. ... BUT - I'd like to be able to refresh only a portion (rectangular region) of the form for speed. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Refresh-Methode
    ... "Unterschiede zwischen Invalidate, Update und Refresh ... alternativ kannst Du im Konstruktor Deines Steuerelementes ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: some questions about layout
    ... Refresh calls Invalidate & Update ... > Pocket Loox 720 and i'm NOT using the Designer!! ... > 2 why is refreshand updateon a panel not working an i have to use ...
    (microsoft.public.dotnet.framework.compactframework)