gettingstarted
[Top] [All Lists]

Re: Endless Paint Events

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Endless Paint Events
From: John McKernon <mckernonjunk at earthlink dot net>
Date: Sat, 31 Dec 2005 20:29:18 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=sLN5mufhrCYH/Qg15wSow1broEsucssBHgl/D4vVoaJobYx/PryBjAsRcvHq5q9N; h=Received:User-Agent:Date:Subject:From:To:Message-ID:Thread-Topic:Thread-Index:In-Reply-To:Mime-version:Content-type:Content-transfer-encoding:X-ELNK-Trace:X-Originating-IP;
Thread-index: AcYOcsiHBx29FnpmEdqagAAKldobdg==
Thread-topic: Endless Paint Events
>>> My first suggestion is to post the code in that paint event There may
>>> be a clue there.
>> 
>> That's the easy part - the entire code consists of:
>> 
>> Sub Paint(g as Graphics)
>> 
>>   System.DebugLog("DisplayWnd Paint Event")
>> 
>> I have the Console open on a separate monitor, and without
>> deactivating RB
>> or my application, I can watch the Paint Events pile up in the console
>> window...
> 
> That explains it perfectly. You simply are misusing the Paint event
> to perform a task that should be done outside it.

It does the same thing when I put back in the code I took out that drew
things in the window. It also does the same thing if I replace the
System.DebugLog statement with a PlaySound statement - I get endless Paint
Events.

So I spent the last few hours removing controls from the window one by one,
and found that if I have any kind of PopUpMenu control on the window, I get
the endless paint events. There doesn't have to be any code connected to the
popups.

To make things worse, I have a small test project which works just fine with
PopUpMenus on it.

So the question now is, what kinds of things should I be looking for in my
code that would cause repeated PaintEvents whenever a PopUpMenu is on the
form? The window in question is a subclass of the regular window class.

I'm baffled, it's New Year's Eve, I'm off to ring in the New Year! Hopefully
2006 will see a solution.

Thanks!

- John




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>