Posted by Barbara Brazil on July 03, 2013 at 06:53:38:
In Reply to: Drawing in the Comet Desktop posted by Robert G Laurin on July 03, 2013 at 06:43:48:
Robert:
You may have noticed that our dialog-based utilities don't allow the user to maximize the screen (messes up the dialog), and that if the screen was maximized when the utility was run, we restore it to maximized when the utility is closed. Here's how we detect and do all that:
length HANDLE.S.LEN & local FrameWnd$ ! Save cosCWnd$ for maximized restore
length 5.0 & Local MaxState ! Save maximized state for restore
! At the beginning of the program...
gosub COS.GetFrameWnd & FrameWnd$ = cosCWnd$
gosub COS.IsMaximized & MaxState = cosState
print (AllowMaximize=0) !Don't let user maximize window
print "" ! Flush GDI command buffer for maximize command
! At the end of the program...
if MaxState = 1 ! Remaximze if we came in maximized
cosCWnd$ = FrameWnd$
cosState = SW.MAXIMIZE
gosub COS.ShowWindow
endif
print (AllowMaximize=1) ! Reestablish ability to maximize window
print "" ! Flush GDI command buffer for maximize command
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.