Re: Drawing in the Comet Desktop


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

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




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]