All
I have created a form to return the width & height of a clients desktop so that I can decide which form to launch next.
The PRE_FORM trigger sets the window to maximized and then performs a GET_WINDOW_PROPERTY (width) & (height) for both the forms_mdi_window and the actual "named" window. It writes these results to a text item on the screen (for testing purposes).
However, the results for the forms_mdi_window are always 0.
If I add the following code to the WHEN-WINDOW-RESIZED trigger, then it displays the correct results, but only after the user has restored and maximized the window again: -
PROCEDURE FORM_SIZE_CHECK IS
mdi_width NUMBER(8);
mdi_height NUMBER(8);
form_width NUMBER(8);
form_height NUMBER(8);
win_id WINDOW;
BEGIN
-- Get dimension of MDI window
mdi_width := GET_WINDOW_PROPERTY(forms_mdi_window, width);
mdi_height := GET_WINDOW_PROPERTY(forms_mdi_window, height);
win_id := Find_Window('CHK_WINDOW');
if not ID_NULL(win_id) then
form_width := GET_WINDOW_PROPERTY(win_id, width);
form_height := GET_WINDOW_PROPERTY(win_id, height)
end if;
:block1.text1 := ('Parent Width = '||mdi_width||' & Parent Height = '||mdi_height||', Window Width = '||form_width||' & Window Height = '||form_height);
END;
Is this a bug in forms or does there need to be a delay before GET_WINDOW_PROPERTY will return the correct values?
Richard
Forms 12.2.1.0.0 on Windows Server 2012.