Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WriteMethod for _SCREEN object 1

Status
Not open for further replies.

florindaniel

Programmer
Dec 4, 2009
120
RO
Hello,

Is there a way to intercept RightClick method of the _SCREEN object? I've tried with WriteMethod but it doesn't work.

I mean: I want to right-click onto the screen and do some stuff (like right-clicking onto the desktop)

Thank you
Daniel
 
Check BINDEVENT() function in HELP (if you use VFP8 or 9)

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
bborisov, Thank you for the answer.

It works great (I've never used BindEvent before).

One more piece of information if you don't mind:

This is the piece of code I use:

PUBLIC goScrHandler As Object
goScrHandler=NEWOBJECT("myScreen")

BINDEVENT(_SCREEN,"RightClick",goScrHandler,"myRightClick")

DO flexGEST.MPR

READ Events
SET SYSMENU TO DEFAULT
UNBINDEVENTS(_SCREEN,"RightClick",goScrHandler,"myRightClick")

*!* goScrHandler.Release() &&& Commented because it dowsn't work



DEFINE CLASS myScreen AS Session

PROCEDURE myRightClick
DO ScrPars.Mpr
RETURN
ENDDEFINE

The question is:
goScrHandler.Release() doesn't work and later when I modify the source program I get a message like "Remove class from memory?"

What should I do?

Thank You
 
Code:
goScrHandler = NULL
RELEASE goScrHandler

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top