Sair do Form com a tecla ESC

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
Responder
davidcastilholi
Rank: Programador Sênior
Rank: Programador Sênior
Mensagens: 47
Registrado em: Qui, 07 Abr 2011 3:54 pm
Localização: Jussara PR
David

Boa tarde pessoal, como eu faria para sair do form com a tecla ESC ?
Avatar do usuário
dr_gori
Moderador
Moderador
Mensagens: 5024
Registrado em: Seg, 03 Mai 2004 3:08 pm
Localização: Portland, OR USA
Contato:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Qual versão do Forms ?
davidcastilholi
Rank: Programador Sênior
Rank: Programador Sênior
Mensagens: 47
Registrado em: Qui, 07 Abr 2011 3:54 pm
Localização: Jussara PR
David

Versão 6i
Avatar do usuário
dr_gori
Moderador
Moderador
Mensagens: 5024
Registrado em: Seg, 03 Mai 2004 3:08 pm
Localização: Portland, OR USA
Contato:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Existe um aplicativo chamado Oracle Terminal (OT60.exe). Caso ele não esteja no diretório BIN, talvez tenha que instalar o developer com essa opção.

Neste aplicativo, é possível mapear o comportamento das teclas: pra editar o arquivo FRMUSW.RES
Por exemplo:

Selecionar tudo

27 : 0 : "Esc" : 32 : "Exit"
Eu não tenho ele instalado na minha máquina, por isso não vou poder te ajudar mais com isso. Mas é por aí o caminho.

O help diz assim:

Selecionar tudo

-------------------------------------------------------------------------
To re-map a Form Builder key binding:
1     Start Oracle Terminal.

2     Open the appropriate Form Builder resource file (on Microsoft Windows, open FMRUSW.RES).
     Note: Before modifying a Form Builder resource file, you should create a backup copy.

3     Choose FunctionsEdit Keys.
     The Key Binding Editor appears and lists Form Builder key bindings by category.

4     Double-click on a category and modify the desired "Action" and "Binding."
     For example, to modify the key mapping for [Show Keys], double-click on "windows-sqlforms," specify 
     the desired key binding for Show Keys, then click OK.

5     Choose FileSave to save your modifications.

6     Choose FunctionsGenerate to generate your modifications and to create a new resource file, which 
     incorporates the changes you made to the key binding.
     An alert appears, informing you that your resource file has been successfully generated. Accept the alert. 

7     Choose FileSave to save your changes to the new resource file.

8     Run Form Builder to use your new key binding.

E esse aqui veio do metalink:

Selecionar tudo

For Mapping Enter Key
PURPOSE
=======
To explain how to map the ENTER key on the keyboard to trigger 
user-defined triggers/actions within the Forms.

SCOPE
=====
Novice to intermediate skills
Developers and application deployers
This article is specific to Oracle Terminal on Windows Platforms.

How to Fire the Key-Enter Trigger for Forms Deployed Client-Server (Windows)?
==================================================

By default, pressing the ENTER key takes the cursor to the next navigable item 
in the block. To override this default it is necessary to edit the forms
resource file containing the key mapping details.

Thus the following instructions illustrate how to use the Oracle Terminal 
utility supplied with Oracle Developer (IDS) to enable the KEY-ENTER trigger 
to be invoked when an end user presses enter or return on the keyboard.

1) Close all Developer Applications.

2) Assuming it has been installed from the base Developer 6i R2 media,
Invoke Oracle Terminal 
(From Start-->Programs-->Oracle Forms and Reports 6i--> Oracle Terminal).

3) Edit the file oracle_home/forms60/fmrusw.res.

4) Go into Key Mapping Binder.

5) Click on the Product Actions.

6) Double click the circle above the Runform.

7) Insert a new row by clicking Insert Row.

8) Put the word ENTER in the Action, 75 for Code, and enter a 
Description. 
Failure to enter a description may result in crash i.e Dr Watson/ Access
Violation / General Protection Fault
Reference:
Bug:620586 Abstract: DR WATSON GENERATING ORACLE TERMINAL RESOURSE FILE

9) Click OK, OK.

10) Go to NORMAL under Runform, and remove any existing key bindings 
for RETURN.

11) Insert a new row with Action as ENTER and Binding as Return. 

12) Click OK, OK.

13) Generate and Save.

14) Create a simple form with one non-db block and one text item. 

15) Create a KEY-ENTER Trigger at the Item Level under the Text item
and keep message('yes').

16) Run the form, navigate to text item, and press the ENTER keys; 
the message appears.

Known Problems
===============

You followed instructions in Oracle Terminal tutorial bulletin for mapping 
the "Enter" action so that he could use a key-enter trigger in his form. 
However, the key-enter trigger is still not working.


Solution:
After adding the "Enter" action with code 75 in Product Actions, you need to 
edit key bindings to delete the binding of Return to Return, and add the binding
of Enter to Return.

If you add the "Enter to Return" key binding at the top of the list, it will 
not work. It needs to be added in approximately the same place where the 
"Return to Return" key binding was located.

To easily accomplish this, click on the "Return to Return" key mapping and 
press the "Delete Row" button. Then immediately press the "Insert Row" button 
to add the mapping of "Enter" to "Return"

Generate the key bindings, save the file, and run the form where a key-enter 
trigger is defined, using the resource file just created.

For Mapping Function Keys
======================
PURPOSE
======

This article tries provide a step-by-step outline to create additional
Key F11 or F12 triggers. Sample here given is for Key F12.

SCOPE & APPLICATION
================

Programmers who wish to map the F11 or F12 key to certain functions.
Take note that it is either F11 or F12 but not both as it reuse 
the F1 key trigger. In Windows, F1 is map to "Help" thus the trigger 
can be exploit by other function key. 

The example is meant for NLS_LANG that is AMERICAN_AMERICA type as the 
resource file used is fmrusw.res. For other NLS_LANG, you may need to 
find the corresponding resource file. (For example, if you are using a
NLS_LANG that is of type TRADITIONAL CHINESE_TAIWAN, the resource file
would befmrzhtw.res).

This step-by-step is tested on Forms6i client-server architecture.

STEPS
====== 
1. Backup the $ORACLE_HOME\forms60\fmrusw.res

2. Using Oracle Terminal, open fmrusw.res.

3. Choose Functions Edit Keys to invoke the Key Binding Editor.

4. In the Key Binding Editor, double-click on runform to invoke the Key 
Binding Definition window.

5. Click on the Insert Row button and then enter the action that corresponds 
to your Key-Fn or Key-Other trigger. (The chart below applies only
to Microsoft Windows.)

6. Specify a key binding for your Key-Fn trigger, then click OK.
Action Binding
User Defined Key 1 F12

7. Click Product Actions to invoke the Product Actions Editor.

8. Double-click on the sqlforms category.

9. Click on the Insert Row button, enter the Action, Code, and Description 
for your Key-Fn trigger, then click OK.
Action Code Description
User Defined Key 1 83 Testing Key
For reasons why 83, see NOTE:14845.1

10. Dismiss the Product Action and Key Binding Editors by clicking on OK for each, then choose FileSave.

11. Choose Functions Generate to generate your modifications and to
create a new resource file, which incorporates the additions you made.

12. Choose File Save to save your changes to the new resource file.

13. Form Builder 

14. New a Form named Module1.

15. New a Block named CONTROL.

16. New a TEST_ITEM named TEXT_ITEM.

17. Create a new trigger named KEY-F1 and code the respective PL/SQL code.
:TEXT_ITEM := 'You have hit the F12 Key';

18. Run the Form and press F12.
Responder
  • Informação
  • Quem está online

    Usuários navegando neste fórum: Nenhum usuário registrado e 19 visitantes