Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a property's value of the activecontrol on a for
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00173807
Message ID:
00173816
Views:
30
Fred,

Dan showed the _screen.ActiveForm, but you shouldn't use it in the OKL, because there's a high probability that there isn't an active form at the time the key is hit. You should just test _screen.ActiveForm and then .ActiveControl inside ghelp.

FWIW, you should also consider using the form.KeyPress() method and getting rid of the OKL entirely.

>I need to pass the value of a property of the activecontrol on a form to a generic messagaging routine.
>
>Basically:
>
>On Key Label F1 DO ghelp WITH Thisform.ActiveControl.agenttext
>
>
>PROCEDURE ghelp
>parameter mtext
>
>=messagebox(mtext,0,'The Help You Wanted')
>RETURN
>
>************************************************
>
>The ghelp procedure is far more complex but basics of what I want to do.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform