Article View: borland.public.delphi.nativeapi
Article #70Re: Why don't modal windows flash?
From: Rob Kennedy
Date: Wed, 21 Jan 2004 20:06
Date: Wed, 21 Jan 2004 20:06
34 lines
2778 bytes
2778 bytes
Brett Watters wrote: > This is a "bug" in Outlook Express. > > Some applications "fake" modal windows by using non-modal windows > which immediately makes itself active when they become non-active -- i.e. > when the user clicks away it just makes itself active again and beeps. This > causes the flicker as it is non-active and then quickly goes active again. > A true modal window would never become non-active and the flicker > doesn't occur. > > The flickering in Outlook Express (including seeing outlines of other > windows 'bleed-through' the main window) is not standard windows > behaviour and should not be emulated. It's not a bug, and it's not flicker. It's flashing. There's a difference. You can see it by using the MessageBox API function. Call it to show a modal dialog box, and then try clicking on your main form. You'll get a beep, and the borders of the dialog box will flash two or three times. More precisely, the window's appearance will alternate between focused and unfocused several times. (The window never actually lsoes the focus; it just repaints its nonclient area a few times.) Delphi forms aren't dialogs. They use a sort of "fake" modal state by disabling all other windows in the program and then re-enabling them when the "dialog" closes. Real dialog boxes use some other method. When the dialog box flashes, it tells the user which window requires attention before the program can continue. It tells the user which "mode" the program is in -- message-box mode, options mode, print-setup mode, etc. Compare that with Delphi forms. Nothing flashes; the screen remains unchanged. The user is left wondering what's wrong. -- Rob
Technical Details
Message-ID:
<400edbac$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<400d8626@newsgroups.borland.com> <400eada7$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f94dd,e2ceacf656009080 X-Google-Attributes: gidf94dd,public X-Google-ArrivalTime: 2004-01-21 12:10:56 PST Date: Wed, 21 Jan 2004 14:06:09 -0600 From: Rob Kennedy <.> Organization: none User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.delphi.nativeapi Subject: Re: Why don't modal windows flash? References: <400d8626@newsgroups.borland.com> <400eada7$2@newsgroups.borland.com> In-Reply-To: <400eada7$2@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.74.197.249 Message-ID: <400edbac$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1074715564 68.74.197.249 (21 Jan 2004 12:06:04 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail