Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress Enter Loop
Message
From
28/10/2003 07:37:10
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00843443
Message ID:
00843450
Views:
17
Hi Brenda

My guess is that you must move the NODEFAULT to be the first command after the IF.

>Wanted to add logic to the KeyPress of a textbox to perform some code that is part of a cmd.click. It is not working as I would like. Outside of the developer it is in a loop and eventually I have to hard restart my machine because it keeps opening new windows of IE. If I go into the debugger on the assert .f. it works fine.
>
>KEYPRESS
>LPARAMETERS nKeyCode, nShiftAltCtrl
>IF nKeyCode = 13 and nShiftAltCtrl = 0
> assert .f.
> THIS.Parent.Cmd_search_pa.click()
> Keyboard "{ENTER}"
> NODEFAULT
>ENDIF
>
>CMD_SEARCH.PA.CLICK
>oIE = CreateObject("InternetExplorer.Application")
>save_number = alltrim(left(m.pst1,at(' ',m.pst1)))
>save_name = alltrim(upper(right(m.pst1,len(m.pst1)-at(' ',m.pst1))))
>save_name = alltrim(strTRAN(save_name, ' ', '%20'))
>URL = 'http://www.scpafl.org/pls/web/re_web.show_pads?pad='+save_name+'&pad_num='+save_number
>oIE.Navigate(URL)
>oIE.Visible = .t.
>
>Thanks
>Brenda
Previous
Reply
Map
View

Click here to load this message in the networking platform