Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Keeping a maximised window maximised when opening other windows

578 views
Skip to first unread message

jim_beam

unread,
Feb 13, 2004, 12:16:15 PM2/13/04
to
Hi all,
can someone help here (PB 9.0 / PFC)

I have an MDI window. In this I have a switchboard sheet
which I want to keep maximised even when opening other
sheets that are not maximised. Currently what happens is on
opening a sub-sheet the swichboard reverts back to is
original size.

I am opening the sub sheets as follows:-

string ls_sheet
w_sheet lw_sheet
ls_sheet="w_form_name"
OpenSheetWithParm(lw_sheet, ls_parm, ls_sheet, w_mdi, 0,
Original!)

What am I doing wrong ?

philip_salgannik

unread,
Feb 13, 2004, 12:31:28 PM2/13/04
to
Well, that's the nature of MDI.
Let me ask you this. Why is your "switchboard" a sheet ?

jim_beam

unread,
Feb 13, 2004, 12:49:03 PM2/13/04
to
Okay,
My switchboard is not actually a sheet and it is not this
form i have the problem with, but it is another sheet which
I want to keep maximised. I was using a switchboard as an
example.
JB

Bruce Armstrong [TeamSybase]

unread,
Feb 13, 2004, 1:05:22 PM2/13/04
to
That is, unfortunately, standard Windoze behavior. You might try
opening your first sheet as Layered!, but if you open up any other
windows in anything other than Layered! I think you'll find that Windoze
will resize them all.

lysaght3

unread,
Feb 13, 2004, 2:27:36 PM2/13/04
to

This may be a side effect but I actually had the opposite
problem that I worked on all this week. I had multiple mdi
windows and could only get each one to minimize
independently of all others.

To cause this problem that you appear to want as a feature
set the default windowstate in the selected window's
properties to maximized!. Then make sure that whenever you
open the window that you DO NOT assign a
parent....use....open(w_my_window) instead of ....
open(w_my_window, w_my_parent_window).

This also works for openwithparm(w_my_window)

IF you want to always open a window set to normal! in the
maximized! setting after it is minimized you can do that
inside the ue_systemcommmand event as follows;
Choose Case CommandType
Case 61472 /* Minimize button */
// this will minimize the parent window of this window when
this windows minbox is clicked.
if IsValid(w_my_parent_window) then
if w_my_parent_window.windowstate <> minimized! then
Send(Handle(w_my_parent_window), 274, 61472, 0)
end if
end if

Case 61458 /* Title Bar/Move */
Case 61536 /* Close from Control Menu */

//This will maximize the window on restore from the
windows taskbar.
Case 61728 /* Restore button */
If IsValid(w_my_window) then
Send(Handle(w_my_window), 274, 61488, 0)
w_my_window.windowstate = maximized!
end if


Case 61587 /* open system menu */
Case 61456 /* Select move in system menu */
case 61440 /* Select size in system menu */
case 61488 /* maximize button */
//case else
//messagebox( '', CommandType )
// return
END CHOOSE

// by setting this to false the original call to minimize
// the w_cubs_main event will trigger.
message.processed=false

NOw to give proper credit I got this idea from a answer to
my question yesterday of How do I minimize the entire
application.

Just look for the question with lysaght3 as the author and
inside someone provided a link that was of great help

Coretta

unread,
Feb 19, 2004, 3:31:16 AM2/19/04
to
In pb6.5 I've done something like this. Overrule the normal
behaviour for one window that needs to remain maximized.
It took me some doing to trich the 'main'window to remain
maximized although the rest of the windows are not. (It's
even hard to reconstruct what I did..)
It was something like;
Open the frame, then have it open the 'main' window (I then
resized it to maximum, but maybe that's a step you can skip
and just open maximized.. remove/disable the minimize,
maximize and control box for the window and hardcoded tell
the window that his current windowstate is 'normal' (instead
of maximized) (this.windowstate = normal!) If it working the
window is maximized, but thinks it's normal so doesn't feel
the need to resize to 'normal' if one of the other windows
is opened.

I know I had a lot of problems getting it to work properly..
I use a dummy window that opens and closes to get the
mimimized, maximized and control box of the main window to
disapear, and I need to open the frame maximized to get the
window in ok. (But that could have to do with our initial
sizing mechanism. We store the last size in a file and
resize a windo to that size when it's opened again.)

So, maybe you could get some ideas out of this. Otherwise I
could start digging deaper in my pb6.5 code.

Coretta
CMW...@hotmail.com

0 new messages