Welcome! Log In Create A New Profile

Advanced

Change the function of keyboard-key

Posted by Huib Preij 
Huib Preij
Change the function of keyboard-key
June 30, 2009 12:44PM
Hello,
I want to change the function of PLUS-key on the numeric path into a TAB-key.
I want to have also a TAB-KEY onthe right side of my keyboard.
We made a procedure and it seems to work well, but of it passes a Date-field, the date is update one day. 17-06-2009 --> 18-06-2009.

Does anyone has an idea?
Thanks.
Huib Preij
Krimpen aan den IJssel, Netherlands.


- Code to make the PLUS-key a TAB-key
===============================================
In the projectcode:
Event(ChangeToets,"*.*",WM_CHAR)

Globalprocedure:
PROCEDURE ChangeToets(pMessage, wParam, lParam)
IF wParam=43 _AND_ lParam=5111809 THEN
SendKey("{TAB}")
END
===============================================
Peter vV
Re: Change the function of keyboard-key
June 30, 2009 01:33PM
Huib,

That doesn't seem to be due to your code (event) .
Must be something else.

--
Peter

Fabrice Harari
Re: Change the function of keyboard-key
June 30, 2009 01:35PM
Hi...

2 things...

1. You are not sending back any result in your global procedure, which means that the normal processing of the + key is called anyway... you should do an _eve.result=0 to block it

2. This behavior (adding a day) is a standard windev behavior, but we don't know which event they are intercepting (it could be keyup, by example)... So if the solution 1 is not enough, you may have to try and intercept other events and block them when on a date field

Best regards

Piet van Zanten
Re: Change the function of keyboard-key
June 30, 2009 01:47PM
Hi Huub,

Have you considered using the Enter key? If you don't have any validation type buttons this is a more logical option, since most end-users are prone to use Enter. (I find validation buttons annoying most of the time anyway)
About the date field: If I hit plus or minus in a date field nothing happens, so it's not a standard Windev feature.

Regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: