Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GET_WINDOW_PROPERTY returns 0 for width & height

Richard HarrisonFeb 20 2017 — edited Feb 21 2017

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.

This post has been answered by Michael Ferrante-Oracle on Feb 20 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2017
Added on Feb 20 2017
4 comments
1,391 views