realbasic-nug
[Top] [All Lists]

Re: How to tell if a window IS maximized

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: How to tell if a window IS maximized
From: Arnaud Nicolet <arnaud at tribu dot ch>
Date: Wed, 28 Mar 2007 01:59:15 +0200
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <4609A5CD dot 5010602 at kinnor dot com> <76C48841-3066-4E36-8CF4-30BAA7E3D326 at tribu dot ch> <a06110400c22f5a48126a at [212 dot 166 dot 207 dot 215]>
Le 28 mars 07 à 01:34 Matin, Aliacta a écrit:

>> IsMaximized=False
>> in the restore event and in the minimize event
>
> (and in the Resize event - Marc)

Remember that when you zoom a window, you also get a Resize event  
(just after the Maximized event).
You can't directly set IsMaximized=false in the Resize event because  
it would break the functionality.

But you're right: if the user zooms a window and then resize it, you  
have to know that and set IsMaximized to false.

You may make it so:

IsMaximized as integer

In the Maximize event:
IsMaximized=1

In the Restore event (but not in the Minimize event):
IsMaximized=0

in the Resize event:
if IsMaximized=1 then 'Zooming right now
IsMaximized=2
else 'Either zoomed before, or not at all zoomed (or already resized  
before)
IsMaximized=0
end if

I think it should work.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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