Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C0000005 in Treeview keypress
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
C0000005 in Treeview keypress
Miscellaneous
Thread ID:
00633579
Message ID:
00633579
Views:
62
VFP 7 / WindowsXP / VFP7 / Form with a MS Treeview Control 6.0(SP4).

The Cancel property of the form's Exit button is set to .T.

I'd like to exit the form when the user presses ESC while the Treeview has the focus (which is most of the time, I use it as a pick list)

I have this code in the keypress method of the Treeview:
*** ActiveX Control Event ***
LPARAMETERS keyascii

if keyascii = 27
   thisform.cmdexitg1.Click()
   nodefault
*  thisform.KeyPress(keyascii)  && tried this too, but ii does nothing...
else
   dodefault()
endif
It works, it presses the Exit button, the form exits, and then I get C0000005. Any ideas what's wrong?

TIA
Doru
Next
Reply
Map
View

Click here to load this message in the networking platform