Hi,
I am trying to position my window at the center of my
forms_mdi_window. How can I do that ?
Printable View
Hi,
I am trying to position my window at the center of my
forms_mdi_window. How can I do that ?
Here is a code snippet
-- Set Position of Upper Left Corner of Application
x_app := (disp_width - app_width) / 2;
IF (x_app < 0) THEN x_app :=0; END IF;
y_app := ((disp_height - app_height) / 2) - 40;
IF (y_app < 0) THEN y_app :=0; END IF;
-- IF Operating System is a form of UNIX THEN
IF ((OS = 'UNIX') OR (OS = 'HP-UX') OR (NOT MAIN)) THEN
-- Set Upper Left Corner of Main Window to be Upper Left Corner of Application
-- set_window_property (window_name, X_POS, x_app);
-- set_window_property (window_name, Y_POS, y_app);
-- NOTE: using the following call instead of the above, appears to
-- solve the problem of the forms randomly coming up on the left
-- side of the screen.
set_window_property (window_name,POSITION,x_app,y_app);