Re: Stuck on infinite loop

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: cody (deutronium_at_gmx.de)
Date: 02/24/05


Date: Thu, 24 Feb 2005 12:52:11 +0100

post your code then we'll see.

a possible reason could be that you called Refresh() or this.OnPaint() in
the OnPaint method.

"Rene" <nospam@nospam.com> schrieb im Newsbeitrag
news:#Pms1GiGFHA.588@TK2MSFTNGP14.phx.gbl...
> I got stuck on an infinite loop on the "Paint" event of my custom control
> and I was not able to "ctrl-break" my way out of it.
>
> After trying everything, I had to ctrs-alt-delete to shut down the
> application and delete the bin and obj folders of the control so that the
> application could start without locking.
>
> I don't understand? I am pretty sure I was able to press ctrl-break before
> and it would stop on the offending line. Could this be a problem with the
> Paint event? I was also not able to set break points on that event (paint)
> because they are ignored.
>
> Has anybody had similar problems? Thanks.
>
>



Relevant Pages

  • Re: Override OnPaint vs Handle Paint event
    ... It is the OnPaint method that does the painting. ... The Paint event is an event raised by this method. ... no delegate instances must be ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Invalidate() compared to Refresh()
    ... How are you "painting" on the PictureBox? ... Does the following from the GDI+ FAQ help? ... The Invalidate one and the Refresh one. ... >> before raising the Paint event). ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Invalidate() compared to Refresh()
    ... The Invalidate one and the Refresh one. ... > The paint event of course is where all the drawing of your PictureBox ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DataGridView border
    ... Instead of overriding the OnPaint method of the user control, you could just subscribe to the Paint event on the DataGridView, and then put the code to paint the border in there. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Faster than GDI+ ?
    ... with transparencies. ... I used GDI+ of course... ... The paint event takes about 250 ms... ... I need to refresh the screen about five times faster. ...
    (microsoft.public.dotnet.languages.vb)