Collected From: http://fdegrelle.over-blog.com/

You can use, play, modify and deploy it as you need and as you want. There is no license at all attached to it.

But, I won't continue to update, maintain it in any way, so there will not be any new version, any support, and I won't respond to any question about it.
Get the Forms Resizer tool for free there
Collected From: http://sheikyerbouti.developpez.com/moveitem/Designer_Forms_Move_item.htm


Because, when you generate Oracle Forms application from Oracle Designer,
it is not always possible to place item at the exact position you want, this is a
PL/SQL procedure which will do the job for you at runtime.


This procedure accept 4 parameters :

The reference item (VARCHAR2) which is the item used to define the start display
The item to move (VARCHAR2) which is the item you want to move
The horizontal position (VARCHAR2) which can be ‘L’ (left) or ‘R’ (right)
The vertical position (VARCHAR2) which can be 'F' (floor), 'C' (ceil), 'T' (top), 'B' (bottom)

Horizontal and vertical arguments accept also a positive or a negative offset
specified in pixel


Demonstration


This is a hard copy of a Forms dialog


And here is the procedure called in the WHEN-BUTTON-PRESSED

PROCEDURE move_all IS
BEGIN
 
            Move_Item ( 'BL.BTREF','BL.BT1','L','C')   ;
            Move_Item ( 'BL.BTREF','BL.BT2','L','T')   ;
            Move_Item ( 'BL.BTREF','BL.BT3','L','F')   ;
            Move_Item ( 'BL.BTREF','BL.BT4','L','B')   ;
           
            Move_Item ( 'BL.BTREF','BL.BT5','R','C')   ;
            Move_Item ( 'BL.BTREF','BL.BT6','R','T')   ;
            Move_Item ( 'BL.BTREF','BL.BT7','R','F')   ;
            Move_Item ( 'BL.BTREF','BL.BT8','R','B')   ;

END;


Then the hard copy of the screen after the calls to the move_item() procedure



This procedure is coordinate-system independent so conversion is made
If your screen is in INCHES, POINTS or CENTIMETERS coordinate-system

If you want the :BL.BT7 item on the Right + 20 pixels from the reference item, enter :

Move_Item ( 'BL.BTREF','BL.BT7','R+20','F')   ;


Code of the Move_item() procedure

PROCEDURE Move_Item
      (
            PC$Item_Ref       in Varchar2,
            PC$Bouton         in Varchar2,
            PC$Horizontal     in Varchar2,
            PC$Vertical       in Varchar2
      ) IS
  --
  ------------------------------------------
  -- Positionning of item from another one
  ------------------------------------------
  --
  -- IN     : PC$Item_ref (reference item)
  --        : PC$Bouton (item to move)
  --        : PC$Horizontal ('L' on left, 'R' on right)
  --        : PC$Vertical ('F' floor, 'C' ceil, 'T' top, 'B' bottom)
  --
     
      -- Reference item --
      LN$PosX     Number;
      LN$PosY     Number;
      LN$Width    NUMBER;
      LN$Heigth   NUMBER;
      -- Item to move --
      LN$Bwidth   NUMBER;
      LN$Bheigth  NUMBER;
      LN$NewX     NUMBER;
      LN$NewY     NUMBER ;   
      -- Offset --
      LN$Pos      PLS_INTEGER ;
      LN$HOffset  NUMBER := 0 ;
      LN$VOffset  NUMBER := 0 ;
      -- Coordinate system --
      LC$Scoord   VARCHAR2(100) := Get_Form_Property( Name_in('system.current_form'), COORDINATE_SYSTEM ) ;

Begin

      -- Reference item --
      LN$PosX     := Get_Item_Property(PC$Item_Ref, X_POS );
      LN$PosY     := Get_Item_Property(PC$Item_Ref, Y_POS );
      LN$Width    := Get_Item_Property(PC$Item_Ref, WIDTH );
      LN$Heigth   := Get_Item_Property(PC$Item_Ref, HEIGHT );

      -- Item to move --
      LN$BWidth  := Get_Item_Property(PC$Bouton, WIDTH );
      LN$BHeigth := Get_Item_Property(PC$Bouton, HEIGHT );      

      -- Offsets --
      LN$Pos := Instr( PC$Horizontal, '-' ) ;
      If LN$Pos > 0 Then
            LN$HOffset := To_Number( Substr( PC$Horizontal, LN$Pos, 5 ) ) ;
      End if ;
      LN$Pos := Instr( PC$Horizontal, '+' ) ;
      If LN$Pos > 0 Then
            LN$HOffset := To_Number( Substr( PC$Horizontal, LN$Pos, 5 ) ) ;
      End if ;
     
      LN$Pos := Instr( PC$Vertical, '-' ) ;
      If LN$Pos > 0 Then
            LN$VOffset := To_Number( Substr( PC$Vertical, LN$Pos, 5 ) ) ;
      End if ;
      LN$Pos := Instr( PC$Vertical, '+' ) ;
      If LN$Pos > 0 Then
            LN$VOffset := To_Number( Substr( PC$Vertical, LN$Pos, 5 ) ) ;
      End if ;
     
      -- Conversion of offset in pixel --
      If LC$Scoord = 'INCHES' Then
             LN$HOffset := LN$HOffset * 0.0104 ;
             LN$VOffset := LN$VOffset * 0.0104 ;
      ElsIf LC$Scoord = 'POINTS' Then 
             LN$HOffset := LN$HOffset * 1.333 ;
             LN$VOffset := LN$VOffset * 1.333 ;
      ElsIf LC$Scoord = 'CENTIMETERS' Then 
             LN$HOffset := LN$HOffset * 0.0263 ;
             LN$VOffset := LN$VOffset * 0.0263 ;
      End if ;
     
      If Substr(PC$Horizontal,1,1) = 'L' Then -- on left
            If Substr(PC$Vertical,1,1) Not in ('B','T') Then
                  LN$NewX := LN$PosX - LN$BWidth ;
            Else
                  LN$NewX := LN$PosX ;
            End if ;
      Else -- on right
            If Substr(PC$Vertical,1,1) Not in ('B','T') Then
                  LN$NewX := LN$PosX + LN$Width ;
            Else
                  LN$NewX := LN$PosX + LN$Width - LN$BWidth ;
            End if ;
      End if ;
      LN$NewX := LN$NewX + LN$HOffset ;
     
      If Substr(PC$Vertical,1,1) = 'F' Then -- floor
            LN$NewY := (LN$PosY + LN$Heigth) - LN$BHeigth ;
      ElsIf Substr(PC$Vertical,1,1) = 'C' Then -- ceil
LN$NewY := LN$PosY ;
ElsIf Substr(PC$Vertical,1,1) = 'T' Then -- top
LN$NewY := LN$PosY - LN$BHeigth ;
      Else -- bottom
            LN$NewY := LN$PosY + LN$Heigth  ;
      End if ;

      LN$NewY := LN$NewY + LN$VOffset ;
     
      Set_Item_Property( PC$Bouton, POSITION, LN$NewX, LN$NewY ) ;
     
END;

 
Collected from: http://sheikyerbouti.developpez.com/formshtmlhelp/formshtmlhelp.htm

1.    Purpose



When you deliver an application, the job is not really complete if it is not shipped with a help system.

Sometimes, for small projects, the budget allowed does not take into account the help system.
(talking about buying a tiers robot help maker solution and formation that comes with...).

This is a solution to get an Oracle Forms contextual html help system that does not cost anything.

The help system contents only html pages that could be build with a simple html editor.
The simple mechanism is provided with html bookmarks inside.

This system provide the following benefits:

q       No third-part soft to buy
q       No special formation
q       The conception/realisation phase could be done by another team - what about the communication/artistical department ? (it’s so modern !)
q       The html system allows to use internal and external navigation mechanisms like bookmarks and hyperlinks.



2.    What is a contextual help system ?


This system allows to a user to display some help on a current topic.
In an Oracle Forms application, this could be the whole dialog, a specific canvas, block or item.

With html documents, we could use the bookmark functionality to jump anywhere we want in the page.


3.    How to call the html page and jump to the correct bookmark ?


You can assign some form-level key triggers that indicate the target topic, then use the Web.Show_Document() Forms web built-in to call the html page with the corresponding bookmark.



4.    Assign the form-level key triggers


In this example, I Assign four form-level key triggers:

q       KEY-F1 (Ctrl+Shift+F1) to get the current item help
q       KEY-F2 (Ctrl+Shift+F2) to get the current block help
q       KEY-F3 (Ctrl+Shift+F3) to get the current tab canvas help
q       KEY-F4 (Ctrl+Shift+F4) to get the current dialog help

Each trigger calling the same procedure, passing its particular argument

KEY-F1 code:  Display_Help(1) ;
KEY-F2 code:  Display_Help(2) ;
KEY-F3 code:  Display_Help(3) ;
KEY-F4 code:  Display_Help(4) ;


5.    Display the html page


To display the corresponding html page, we use the Web.Show_Document built-in.
We need to build a correct url with the page name and the corresponding bookmark.
This html page is stored in a server directory pointed in the httpd.conf or the forms.conf configuration files.
The html file name is the same as the Forms module name (with lower case).

The following code show the procedure that build the url and call the page:

PROCEDURE Display_Help
 (
    PN$Scope in PLS_INTEGER
 )
IS
  LC$Form    Varchar2(80)  := Lower( Name_in( 'system.current_form' ) );
  LC$Block   Varchar2(60)  := Lower( Name_in( 'system.cursor_block' ) );
  LC$Item    Varchar2(60)  := Lower( Name_in( 'system.cursor_item' ) );
  LC$TabCan  Varchar2(60) ;
  LC$Path    Varchar2(128) ;
  LC$Cmd     Varchar2(128) ;
BEGIN

--------------------------------------------------------
-- Only used to test on a Developer Suite environment --
LC$Path := 'file://D:\Dev10gR2/tools/web/help/' ;
--------------------------------------------------------

LC$TabCan := GET_ITEM_PROPERTY(LC$Item , ITEM_TAB_PAGE ) ;

LC$Item := Replace( LC$Item, '.', '_' ) ;

-- Build the calling url --
LC$Cmd := LC$Path || LC$Form || '.htm' ;    -- dialog name

If PN$Scope = 1 Then
     LC$Cmd := LC$Cmd || '#' || LC$Item ;   -- item bookmark
End if ;

If PN$Scope = 2 Then
    LC$Cmd := LC$Cmd || '#' || LC$Block ;   -- block bookmark
End if ;

If PN$Scope = 3 Then
    LC$Cmd := LC$Cmd || '#' || LC$TabCan ;  -- tab bookmark
End if ;

-- Display the html page --
Web.show_document(LC$Cmd, '_blank') ;

Clear_message ;

END;

 

 

 

6.    The html page content


In the corresponding html page, I added the correct bookmarks before each corresponding entry.

The html file must have the same name that the Forms module.



q       tab canvas bookmark name is the tab canvas name property
q       block bookmark name is the block name property
q       item bookmark name is build with the block name and the item name, separated with the _ (underscore) character.


7.    The sample dialog



Ø      Unzip the formshtmlhelp.zip file

Ø      Copy the help_ctx.htm file in the /forms/html/ virtual directory (see the /forms/server/forms.conf file)

Ø      Open the HELP_CTX.fmb module (Oracle Forms 10.1.2)

Ø      Compile and run the module


Place the cursor anywhere you want and call the help. (Ctrl+Shift+F1 to get the current item help)


In this example, i call the help from the EMP.SAL item


Collected from: http://sheikyerbouti.developpez.com/index_en/


Introduction........................................................................................................3
Color definition table ........................................................................................3
Colors.pll.............................................................................................................4
Color selection screens .....................................................................................5
PL/ SQL-based dialog...................................................................................6
Java Bean-based dialog.................................................................................7
Changing Forms menu colors..........................................................................8
Forms test module.............................................................................................8
Setup Instructions .........................................................................................9
Summary.............................................................................................................


Intoduction
The solution introduced in this paper allows Oracle Forms application users to
customize the colors used in a form. A color selection screen is available for the
following Forms items:
x Canvas color
x Tab canvas color
x Prompts (and tooltips) color
x Background buttons color
x Text buttons color
x Background current record color
x Text current record color
Individual user preferences are stored in a database table which holds a table row
for each user. The application user is identified by a unique value of type
NUMBER. This value is read when loading the first screen and thereafter is sent as
a parameter in each subsequent call to a screen (CALL_FORM, OPEN_FORM,
NEW_FORM).
The customized color defined for each item is applied during Forms startup by
calling a PLSQL function in theWHEN-NEW-FORM-INSTANCE trigger
The PLSQL function is located in a Forms library, FRORUV SOO, and loops through all
visible items, setting the colors through visual attributes.
Though this paper focuses on Oracle Forms 10g, the provided PL/ SQL code
examples also work with earlier releases of Forms. All source examples are
available at otn.oracle.com/ products/ forms.

Color Definition Table
The table that holds the customized colors for a user must contain at least one
row, with COD_UTIL = 0, which contains the default values (RGB format) for
users who don’t use a customized color scheme.

CREATE TABLE UTIL_PREFS
(
COD_UTIL NUMBER(5) PRIMARY KEY, -- User code
C_FOND VARCHAR2(20 BYTE), -- color of canvas
C_LIBELLE VARCHAR2(20 BYTE), -- color of prompts
C_CADRE VARCHAR2(20 BYTE), -- color of tab canvas
C_BOUTON VARCHAR2(20 BYTE), -- color of background buttons
C_TBOUTON VARCHAR2(20 BYTE), -- color of text buttons
C_CURREC VARCHAR2(20 BYTE), -- color of background current
-- record
C_TCURREC VARCHAR2(20 BYTE) -- color of text current
-- record
) ;
INSERT INTO UTIL_PREFS ( COD_UTIL, C_FOND, C_LIBELLE,
C_CADRE, C_BOUTON, C_TBOUTON, C_CURREC,C_TCURREC) VALUES (
0, ’r128g128b192’, ’r255g255b64’, ’r64g128b255’, ’r255g192b255’,
’r64g64b192’, ’r128g255b255’, ’r128g128b255’);
A Forms color selection dialog is provided in the sample code of this solution and
handles the user specific table inserts and updates.
&2/256 3//
The colors.pll library contains the PL/ SQL code to customize the color of visual
objects in Forms at startup, at enter query (which color all queryable items with the
color specified in the VA_QUERY visual attribute), and after execute query to
recall previous colors.
The colors.pll library needs to be attached to the Forms modules used in a Forms
application. Copy the *53B&2/256 group from the object library FRORUV ROE
The *53B&2/256 group contains the following objects that need to be added to
the Forms module:
x A form level trigger WHEN-NEW-FORM-INSTANCE for the
colorization function call
x A form level trigger KEY-ENTQRY for the colorization in ENTERQUERYmode
x A form level trigger KEY-EXEQRY to re-set the initial colors after
execute query
x 3 alert boxes
x A parameter 87,B,' for handling the ID that uniquely identifies the user
x Visual attributes for colorization of objects
The color.pll library contains 2 PLSQL procedures and 1 PLSQL package:
x 6WDUWBTXHU\ - procedure to color queryable items in ENTER-QUERY
mode

x (QGBTXHU\ - procedure to re-set the initial colors after EXECUTEQUERY

PKG_COLORS PACKAGE
o Global variables for the colors read from the UTIL_PREFS table
o Global variables to translate Strings used in the COLORS.FMB
and COLORS_J.FMB screen
o Procedure “Paint”, which is the main procedure called during the
Forms instance startup
o Procedure Set_colors
Items that are not navigable are colored with a light gray background. All mandatory
items are indicated by a bold prompt. You maywant to customize the PLSQL package to
use your preferred indicators.

To preserve the initial colors of items, start the TOOLTIP_TEXT with the NCC (No
Change Color) characters. These 3 characters are removed when the program is executed
to insure a correct tool tip display

COLOR SELECTION SCREEN
Two Forms screens are provided with this whitepaper, as well as samples that
allow the user to customize the application color for that instance:
x PL/ SQL based dialog (COLORS.FMB) - This screen uses native Forms
code to render the color selection dialog.
x Java Bean based dialog (COLORS_J.FMB) – This screen uses the Color
Picker Java Bean sample from the Oracle Forms demos. Using the Java
Bean does allows the user to choose from more colors than the PL/ SQL
based screen, but requires the bean JAR files to be deployed with the
application.
All screens can be accessed through a menu option or buttons. All that needs to be
done is to pass the user code in the UTI_ID parameter. Never transmit the 0 code
which is the per-populated default code

PL-SQL Based Dialog




To customize the color of a visual component in Forms, click the corresponding button
of the object to change the color of and click on one of the 64 color cells. Save the screen
(Ctrl+S) to store the new colors or just exit (F4) to cancel anymodification

JAVA BEAN BASED DIALOG

To customize the color of a visual component in Forms, click the corresponding
button of the object to change the color, then select the color from the Bean
selection dialog. Save the screen (Ctrl+S) to store the new colors or just exit (F4)
to cancel anymodification.
In order to run the screen with the Java Bean component, you need to download
the colorpicker.jar file, which is a part of the Oracle Forms 10g demos available on
the Oracle TechnologyNetwork (OTN)1
x To configure the Bean, copy the file colorpicker.jar into the
<ORACLE_HOME>/ forms90/ java directory
x Edit the Forms formsweb.cfg configuration file located in
<ORACLE_HOME>/ forms90/ server/ and add the colorpicker.jar file
to the JInitiator archive tag
[myColorfulApp]
form = myForm.fmx

archive_jini=f90_all
...
1 http:/ / download.oracle.com/ otn/ other/ general/ forms10gdemos9_0_4_2.zip


Changing Forms Menu Color