>>>>Either pass the form reference to the menu as a parameter (
do ToolTipsMenu.mpr with this, and from there pass it again to the pad code) or use
_SCREEN.ActiveForm.
>>
>>Antonio:
>>
>>I tried it. This is what I have now.
>>
>>Right Click Event of the form has the folowing code:
>>
>>
do ToolTipMenu.mpr with this
>>
>>In the ShortCut Menu:
>>
"Show Tool Tips" calls Do ShowTips.prg
>>"Deactivate Tool Tips" calls Do NoTips.prg
>>
>>Code in ShowTips:
>>
>>
_Screen.ActiveForm.ShowTips = .t.
>>
>>Code in NoTips:
>>
>>
_Screen.ActiveForm.ShowTips = .f.
>>
>>Outcome: I get the error message "No parameter statement is found."
>>
>>Where am I going wrong?
>
>You have by now a working solution, and that's what matters, but nevertheless, here it goes...
>
>As I said, it was "Either-or"... The second solution (reference
_SCREEN.ActiveForm) means that the menu code can safely assume it will operate on the form. The first will work on any kind of object (one that has
ShowTips property, of course, which will include
_SCREEN and
Toolbars). You have the second one working, so how do you put the first one to work also? When you're editing the RC menu, select
View:General options...:Setup... and write down a
PARAMETERS oObj statement. You get rid of the "No parameter statement is found" error message and you can reference the object in
PADs code as
oObj.
Thanks Antonio.
- Ravi
True greatness consists in being great in little things.
- Charles Simmons