Toad World® Forums

Help


#1

Hello

I m running Oracle forms 10g on Windows, I want to center my window use the code below :

DECLARE
W_MDI NUMBER;
W_SDI NUMBER;

H_MDI NUMBER;
H_SDI NUMBER;

BEGIN
–Get width
W_MDI := GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WIDTH);
W_SDI := GET_WINDOW_PROPERTY(‘WINDOW0’,WIDTH);

–Get height
H_MDI := GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,HEIGHT);
H_SDI := GET_WINDOW_PROPERTY(‘WINDOW0’,HEIGHT);

SET_WINDOW_PROPERTY(‘WINDOW0’,POSITION,(W_MDI-W_SDI)/2,(H_MDI-H_SDI)/2);

END ;

The above code (WRITE on WHEN-NEW-FORM-INSTANCE) is perfectly running in Forms6i but its not working on Forms 10g.

Can any one Assist me OR share with me the right solution ? Why its not working on Forms10g