Auto Centering

[ Follow Ups ] [ Post Followup ] [ Forum ]

Posted by Grant Foraker on June 06, 2014 at 12:32:46:

Comet Women gave me the code to center a dialog in the user's screen. Saves a lot of clicking on the Title Bar and dragging. It does change the Top/Left coordinate.

To save confusion in my program I added a couple of things to the routine.

LENGTH 4 & LOCAL ScosDlghDlg$
!------------------- CENTER IN SCREEN ------------------------------------------
LET ScosDlghDlg$ = cosDlghDlg$
gosub COS.GetFrameWnd
cosDlghDlg$ = cosCWnd$
cosCWnd$ = "@00000000@"
cosState = 0 ! CENTER IN SCREEN
gosub COS.SetWindowPos ! MOVE DIALOG
LET cosDlghDlg$ = ScosDlghDlg$

I've been placing the routine right after "COS.ShowWindow".

Follow Ups:

Post a Followup



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


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 ] [ Forum ]