Ask the Expert

Oracle Forms Developer script to change Windows resolution

I have to find a script in Oracle Forms Developer 6.0 that allows me to change the Windows resolution from 1024*768 to 800*600.

    Requires Free Membership to View

The GET_APPLICATION_PROPERTY built-in function returns information about your application, allowing you to react dynamically at runtime based on the settings of one or more of these variables:

DISPLAY_HEIGHT and DISPLAY_WIDTH: Specifies how big the current display is. The unit depends on how you have set up the form coordinate system.

OPERATING_SYSTEM: Specifies the name of the platform on which the application currently is running (MSWINDOWS, WIN32COMMON, SunOS, VMS, UNIX, or HP-UX).

USER_INTERFACE: Specifies the name of the user interface technology on which the application is currently running (WEB, MOTIF, MSWINDOWS, MSWINDOWS32, PM, X, VARCHAR2MODE, BLOCKMODE, or UNKNOWN).

Depending on the value of a variable, you can dynamically hide objects that are not available on that deployment platform, reposition other objects to take up that space and, if necessary, alter the attributes of an object to suit the standards on that deployment platform.

To prevent users from seeing placeholders on platforms that do not support OLE, VBX and ActiveX objects, you can put these objects in a separate window invoked from the menu or a button and dynamically enable/disable the menu item or button. Or you can use this code fragment to hide/show the port-specific objects and reposition other objects to take their place:

WHEN-NEW-FORM-INSTANCE trigger:
declare
ui varchar2(15) ;
begin
ui := get_application_property (user_interface);
if ui = 'CHARMODE' or ui = 'MOTIF' then
set_item_property ('VBXOBJECT1', displayed, property_false);
set_item_property ('OLEOBJECT1', displayed, property_false);
set_item_property ('TEXTITEM1', position, 43, 4);
end if;
end;

This was first published in January 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: