Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How is the form events order when its calling
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00851707
Message ID:
00852556
Views:
8
Hi Again,
yes my toolbar cmdaddnew.click button code as your code and before i'am detecting it like below code
* Toolbar.cmdAddNew.Click()
If type("_screen.activeform")<>"O"	
	thisform.stop() && makes disable controls
	RETURN .t.
ENDIF
_screen.ActiveForm.AddNew()
i think your keypress event code will solve my problem and i don't need to use on key label f2 oToolbar.cmdaddnew.click() command at loadevent and for release it on destroy event . isn't it ?
* Form.KeyPress( nKeycode, nShiftAltCtrl )
if ( nKeyCode = -1 ) && F2
   this.AddNew()
   nodefault && prevent the key from being seen by the current ActiveControl
endif

return dodefault( nKeycode, nShiftAltCtrl )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform