OraFormsFindAndSetWindow Function

Action

OraFormsFindAndSetWindow finds a window (based on any portion of the window’s name or the window’s full name) and sets it as the active window. On success, it returns the handler ID of the window. If the window cannot be found, it returns -1.

Include file

OraForms.bdh

Syntax

OraFormsFindAndSetWindow(    in sPartName : string,
                             in nCount    : number optional,
                             in nSearch   : number optional ): number;

Return value

  • The ID of the window on success.

  • -1 otherwise

Parameter Description
sPartName Substring of the window name to be matched.
nCount More than one window may match the pattern. Specify the index of the window that is to be returned and set it as the active window.
nSearch

Serach options:

  • ORA_SEARCH_STARTSWITH

  • ORA_SEARCH_ENDSWITH

  • ORA_SEARCH_CONTAINS

Example

dcltrans
  transaction TMain
  var
    sValue : string;
    Id     : number;
  begin
    OraFormsSetConnectMode(ORA_SOCKET_CONNECTION); 
    // Connect - with connection properties
    OraFormsSetInt("INITIAL_VERSION", 608);
    OraFormsSetPoint("INITIAL_RESOLUTION", 96, 96);
    OraFormsSetPoint("INITIAL_DISP_SIZE", 1024, 768);
    OraFormsSetInt("INITIAL_COLOR_DEPTH", 256);
    OraFormsSetString("FONT_NAME", "Dialog");
    OraFormsSetPoint("INITIAL_SCALE_INFO", 8, 18);
    OraFormsSetBoolean("WINSYS_REQUIREDVA_LIST", false);
    OraFormsConnect("server module=Person3.fmx userid= useSDI=yes record=names");
    OraFormsSetWindow("Logon");
    OraFormsLogon("user",
"password", "orcl_server"); 
    // ---
    // New window activated: WINDOW1
    Id := OraFormsFindAndSetWindow("WIND", 0, ORA_SEARCH_STARTSWITH);
  end TMain;