DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: centering my window

  1. #1
    Join Date
    Nov 2000
    Posts
    198
    Hi,
    I am trying to position my window at the center of my
    forms_mdi_window. How can I do that ?

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    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);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width