Hi everybody,
I'd like to Override _SCREEN Events for example: Init(), Load(), Unload(), Custom Methods, etc.
I can do it in a Form like this:
but, how can I do it on _SCREEN?, I suppose the answer is BINDEVENTS() but I cant make it work.
I found this sample on VFP file help:
Thanks for your help...!
I'd like to Override _SCREEN Events for example: Init(), Load(), Unload(), Custom Methods, etc.
I can do it in a Form like this:
Code:
oForm = CreateObject("MyForm")
oForm.Show(1)
Release oForm
DEFINE CLASS MyForm AS Form
PROCEDURE Init
? "Método Init Sobreescrito"
ENDPROC
ENDDEFINE
but, how can I do it on _SCREEN?, I suppose the answer is BINDEVENTS() but I cant make it work.
I found this sample on VFP file help:
Code:
PUBLIC oHandler
oHandler=NEWOBJECT("myhandler")
DO (_browser)
BINDEVENT(_SCREEN,"Resize",oHandler,"myresize")
DEFINE CLASS myhandler AS Session
PROCEDURE myresize
IF ISNULL(_obrowser) THEN
UNBINDEVENTS(THIS)
ELSE
_obrowser.left = _SCREEN.Width - _obrowser.width
ENDIF
RETURN
ENDDEFINE
Thanks for your help...!