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 ?
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
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