Posted by Barbara Brazil on December 14, 2005 at 10:21:19:
In Reply to: AllowMaximize posted by Grant Foraker on December 14, 2005 at 09:08:24:
Grant:
DbMgr and ViewMgr do this. Now, these programs were written with a very early version of the API so there may be a better way to do this today, but here's how they do it:
length 5.0 MaxState
at startup...
gosub COS.IsMaximized & MaxState = cosState ! Save setting
print (AllowMaximize=0) ! Don't let user maximize window
print "" ! Flush GDI command buffer for maximize command
then at shutdown...
if MaxState = 1 ! Remaximze if we came in maximized
cosCWnd$ = FrameWnd$
cosState = SW.MAXIMIZE
gosub COS.ShowWindow
endif
bb