On 9 Oct 99, at 1:15, Warren Vick, Europa Technolog wrote:

> You can indeed query the WIN_INFO_HEIGHT and WIN_INFO_WIDTH of a window and
> save it for restoration later. However, for handling the window maximised (or
> minimised) state, you don't have to remember the size - just the fact that it
> is maximised or minimised. Use the WIN_INFO_STATE attribute to query the
> windows states and store that along with the width and height information.
> Use "set window ..." to restore the height, width and state.

I am doing it that way at the moment, but it has a fatal flaw:

I am trying to remember the last position of the message window & 
restore it to the same place the next time the user runs the application.

I can remember the position of the message window with 
windowinfo(WIN_MESSAGE, WIN_INFO_X)  (and Y of course)
and save that as MWLeft (& MWTop). The next time the user loads up I 
place the message window with
Set Window WIN_MESSAGE Position (MWLeft, MWTop) (etc)

This works ok, except...

Sometimes I found people would move the message window down to the 
bottom of the screen & quit. Then, to make matters worse, they would 
change the screen resolution to a smaller size (don't ask me why!) and 
restart the application. The message window would then be down below 
the bottom of the screen, and there was no way to grab it & drag it back, 
short of going into the Registry & changing the numbers to something 
smaller!

My plan is to test if the message window is off the bottom of the screen 
(or the right) & to move it back to 0,0 if it is.

However, a simple test for

 If (WindowInfo(FrontWindow(), WIN_INFO_HEIGHT) > MWTop) and 
(WindowInfo(FrontWindow(), WIN_INFO_WIDTH) > MWLeft) then

doesn't work, because it's not telling me the "maximised" (i.e. present 
size because my application always starts maximised) size of the map 
window, it's telling me what size the window WOULD be if I didn't start it 
maximised...

I can't figure a way around this at the moment. Guess I could add a menu 
option "Bring back message window" if I can't get it done any other way...

Dave
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to