Being a generic function, I don't have it in a method code. I have it in a function in a separate PRG; the function will accept neither This nor ThisForm.
Anyway, I think I have found a solution to my problem already - the problem was that the object didn't appear with the name the function expected.
Hilmar.
>Hi!
>
>When you activate the shortcut menu from the method code, "this" is accessible in the commands of shortcut menu. It is easy to get path top the form and also make a code such waythat "this" will point to form. It is possible also to use a temporary public variable - reference to the form, that is created for duration of shortcut menu activation to allow use form object PEMs and objects.
>
>In your case, as you use generic function, just pass a form reference (thisform) to the function as a parameter. When EditBox is just based on some class where that function is called, you will have an easy time to fix this - just in one place ;)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)