Page 1 of 1

How can I CENTRE my main application window ?

Posted: Thu Jul 12, 2007 8:34 pm
by Ollie
How can I CENTRE my main application window ?

CENTER is not allowed in the command

DEFINE WINDOW Win_Main FROM 0, 0 TO 600, 800 PIXEL TITLE 'Hello World' MDI ICON oIcon MENU mainmenu()
DEFINE BUTTONBAR oMain_Toolbar OF Win_Main SIZE 70, 50 3D
DEFINE BUTTON of oMain_Toolbar PROMPT "New Report" TOP ACTION newreport( )
DEFINE BUTTON of oMain_Toolbar PROMPT "Search" TOP ACTION searchreport( )
DEFINE BUTTON of oMain_Toolbar PROMPT "Exit" TOP ACTION quitprog()
ACTIVATE WINDOW Win_Main ON INIT LOGON() VALID lExitAllowed CENTER ???

Re: How can I CENTRE my main application window ?

Posted: Thu Jul 12, 2007 9:44 pm
by Enrico Maria Giordano

Code: Select all

WNDCENTER( oWnd:hWnd )
EMG

Posted: Thu Jul 12, 2007 10:09 pm
by Ollie
Thanks for the response.

Please excuse my ignorance.

Where do I put this?

I put

WNDCENTER( Win_Main:hWnd )

After my ACTIVATE WINDOW statement and it seems to have no effect.

Posted: Thu Jul 12, 2007 10:10 pm
by Enrico Maria Giordano
Not after, before.

EMG

Posted: Thu Jul 12, 2007 10:17 pm
by Ollie
Super. Thank you very much.