* * ScreenMethods.PRG * * Fred Taylor - ElZorro 4/10/2001 www.elzorro.org * * Use the following to modify _SCREEN methods: * * For VFP6 & 7: * * _SCREEN.NewObject("oSH","ScreenHook","screenmethods.prg") * * For VFP3 & 5: * * SET PROCEDURE TO screenmethods ADDITIVE * _SCREEN.AddObject("oSH","ScreenHook") * * Any of the main VFP screen methods can be hooked into in this manner. * DEFINE CLASS ScreenHook AS CUSTOM oScr = _SCREEN PROCEDURE oScr.Resize() * * Code to handle the main VFP screen being resized * WAIT WINDOW NOWAIT TRANSFORM(this.Width)+" "+TRANSFORM(this.Height) ENDPROC PROCEDURE oScr.RightClick * * Code to do a "shortcut" menu on main VFP screen RightClick * DO testmenu.mpr ENDPROC * * Custom methods work, too. * PROCEDURE oScr.MyMethod wait window "my method fired!" ENDPROC ENDDEFINE