Wednesday, July 22, 2015

Centralize Oracle Window Forms 


In the name of Allah, Most Gracious, Most Merciful      
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,



   Centralize Oracle Window Forms On Web Browser Definition:Task 
  
Task Solution: 

You can use the following code in 
WHEN-WINDOW-ACTIVATED or PRE-FORM Trigger Form Level


SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);  
SET_WINDOW_PROPERTY('MAIN_WINDOW', X_POS, (GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WIDTH ) - GET_WINDOW_PROPERTY('MAIN_WINDOW', WIDTH )) / 2);  
SET_WINDOW_PROPERTY('MAIN_WINDOW', Y_POS, (GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, HEIGHT) - GET_WINDOW_PROPERTY('MAIN_WINDOW', HEIGHT)) / 2);  


The following code  is another option you can use in
 WHEN-WINDOW-ACTIVATED or PRE-FORM Trigger Form Level



DECLARE

    v_window               WINDOW;
    v_window_height        NUMBER(10);
    v_window_width         NUMBER(10);
    v_height               NUMBER(10);
    v_width                NUMBER(10);
    v_ calc_width          NUMBER(10);
  

BEGIN

   v_window := FIND_WINDOW(YOUR_WINDOW_NAME);

   v_height := TO_NUMBER(GET_APPLICATION_PROPERTY (DISPLAY_HEIGHT));

   v_width := TO_NUMBER(GET_APPLICATION_PROPERTY  (DISPLAY_WIDTH));

   v_window_height:= GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, HEIGHT);

   v_window_width := GET_WINDOW_PROPERTY (FORMS_MDI_WINDOW, WIDTH);

             v_calc_width: = (v_width - v_window_width)/ 2;


             v_calc_height : = (v_height - v_window_height)/ 2;

SET_WINDOW_PROPERTY(v_window,POSITION,v_calc_width,v_calc_height);

END;




Note: 


DISPLAY_HEIGHT: Returns the height of the display in the coordinate system of the form module.
DISPLAY_WIDTH: Returns the width of the display in the coordinate system of the form module.


Learn more about: 

·        Dependent Drop Down list

Hope this helps…

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.


No comments :