Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress Enter Loop
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
KeyPress Enter Loop
Miscellaneous
Thread ID:
00843443
Message ID:
00843443
Views:
53
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
Next
Reply
Map
View

Click here to load this message in the networking platform