Home » Developer & Programmer » Forms » Using Numeric Keypad in Oracle Forms
Using Numeric Keypad in Oracle Forms [message #196858] Sun, 08 October 2006 13:04 Go to next message
waseemharoon
Messages: 4
Registered: April 2006
Location: Karachi
Junior Member

Dear All,

I am facing some problems when I am Working with Numeric Keypad on Oracle Forms 6i.
I have 10 Buttons and In Every Button Property I have defined the "Access Key".

e.g
Buttons | Property   | Value
----------------------------
Button1 | Access Key | "1"
Button2 | Access Key | "2"
Button3 | Access Key | "3"
Button4 | Access Key | "4"
Button5 | Access Key | "5"
Button6 | Access Key | "6"
Button7 | Access Key | "7"
Button8 | Access Key | "8"
Button9 | Access Key | "9"
Button0 | Access Key | "0"

Example : When I will Press Only "1" Using Numeric Keypad, Message Window will appear with the Message "You have Pressed 1..."

All Buttons are functioning Properly when I Pressing (One Key Stroke) 1,2,3,4,5,6,7,8,9,0 using Numeric KeyPad.

But I am not able to apply this Technique on "*" , "/" , "-" , "+" , "." , "Num Lock".

How Can I utilize these Characters(*,-,+,/,NumLock) in my application to perform a certain task using Single Key Stroke through Buttons or any other way in Oracle Forms 6i.

Note : We don't want to give Keyboard / Mouse to User. We have given a Numeric KeyPad to the User for a Certain Task.

Thanks in Advance
Muhammad Waseem Haroon
mwaseem_haroon@yahoo.com
waseemharoon@gmail.com
ocp_waseem@hotmail.com
Re: Using Numeric Keypad in Oracle Forms [message #197081 is a reply to message #196858] Mon, 09 October 2006 22:38 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I don't think that you can intercept the 'NumLock' key as Oracle Forms is a block mode application and you need to press the 'Enter' key for the data to be sent to the Form. Unless, of course, you write a Java thingy that traps each key-stroke, then you may be able to 'see' the 'Num-Lock' key when it is pressed.

David
Re: Using Numeric Keypad in Oracle Forms [message #250125 is a reply to message #197081] Sun, 08 July 2007 06:39 Go to previous message
waseemharoon
Messages: 4
Registered: April 2006
Location: Karachi
Junior Member

Sorry for Late Reply.

I was just reviewing my posts so that I have found this thread as incomplete.

I have resolved this issue using a simple logic and wants to share the same.

1) Create Text item on Canvas.
2) Rename Text Item to "TEST"
2) Go To The Properties of TEXT ITEM.
3) Set "Data Type" to "Char".
4) Set "Maximum Length" to "1".
5) Set Automatic Skip to "Yes".
6) Set "Database Item" to "No".
7) Go To PL/SQL Editor for that TEXT ITEM
Cool Paste Below Code in "WHEN-VALIDATE-ITEM" TRIGGER
/************************************************************
* ***********************************************************
*   Author       : Muhammad Waseem Haroon                   *
*   Created  On  : 15-OCT-2006                              *
*   Module       : Warping & Sizing                         *
*   Purpose      : ^^^^^^^^^^^^^^^^                         *
*************************************************************/

IF :test = '1' THEN
	MESSAGE('1 is pressed...');	
	MESSAGE('1 is pressed...');	
	:test := NULL;
ELSIF
	:test = '2' THEN
	MESSAGE('2 is pressed...');	
	MESSAGE('2 is pressed...');	
	:test := NULL;	
ELSIF
	:test = '3' THEN
	MESSAGE('3 is pressed...');	
	MESSAGE('3 is pressed...');	
	:test := NULL;
	-- ..
	-- ..
	-- ..
	-- ..
	-- ..
	-- ..
	-- ..
ELSIF
	:test = '*' THEN
	MESSAGE('* is pressed...');	
	MESSAGE('* is pressed...');	
	:test := NULL;
ELSIF
	:test = '/' THEN
	MESSAGE('/ is pressed...');	
	MESSAGE('/ is pressed...');		
	:test := NULL;
ELSE
	:test := NULL;
END IF;

Well... djmartin said is correct but I have utilized maximum of them.

Best Regards,

Muhammad Waseem Haroon
ocp_waseem@hotmail.com
mwaseem_haroon@yahoo.com
waseemharoon@gmail.com
  • Attachment: TEST.fmb
    (Size: 44.00KB, Downloaded 251 times)
Previous Topic: "IN" Clause
Next Topic: Format of number
Goto Forum:
  


Current Time: Fri Dec 02 14:05:28 CST 2016

Total time taken to generate the page: 0.11064 seconds