by Gilbert » Tue Feb 20, 2007 7:01 pm
Hi James,
I`m implementing new picture clause in the TGet. So far it works ok exept for one situation.
One picture clause I create allows the user to use FastLogin by using CTLR-G or whatever. (All 26 alpha key are available). Of course this FastLogin key has been configured in a User managament module where the user can create new users and define a FastLogin key.
So far, so good it works nicely. The only problem that this is causing me is whenever I have to capture an E-Mail address in a get field I cannot capture the @. TGet crashes. I figured out that it was because whenever the ALT Key is used it goes through the same routine that I added to the TGET that captures the FastLogin.
The strange thing about this is that the FastLogin should only work with CTRL Key. But I found out that using GetKeyState(VK_CONTROL) wich test the CTRL key also test the ALT Key. Because of this TGet crashes.
Finaly, I was able to work around the problem by doing the following:
do case
case GetKeyState(VK_MENU)
// Do Nothing
case GetKeyState(VK_CONTROL)
...
...
...
endcase
By testing VK_MENU (ALT key) first I eliminate the fact that using the ALT key GetKeyState(VK_CONTROL) processes the ALT + whaterver key may be used. This work around is quite weird but it works.
Regard,
Gilbert