Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters ...
Message
From
31/05/2001 08:53:16
 
 
To
31/05/2001 08:43:02
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Miscellaneous
Thread ID:
00513091
Message ID:
00513104
Views:
15
This message has been marked as the solution to the initial question of the thread.
Hi!

Well, you can do it that way too, but _screen.SctiveForm is not reliable reference to the active form, it returns incorrect unusable object when your form have ActiveX. It is much more reliable to use the object reference. If you want to use this menu for several forms, this should work ok. Just populate correct form reference in the public variable before menu activating.

Instead of public variable you can also use the property of the _Screen:

_Screen.AddProperty('ShortcutForm')

Than you can assign to i the form using _Screen.ShortcutForm. Note that this is much similar to the public variable...

HTH.

>so what you're saying is that if I was to pass data from a shortcut menu I sould make the menu procedure a call to the calling form -_Screen.activeform.SomeMethod where SomMethod is something like < do form oForm with this to that )
>
>correct?
>- jer
>
>>Hi!
>>
>>No. You require to pass data from one form to another. Menu just can call the method of the main form when user select certain menu item. Than the method of the main form can do whatever you want, include the call of the child form. Data culd be passed many ways. In the menu form method call usually will look like following:
>>oMyForm.CallChildForm(oMyForm.SomeValue1,MyAlias.IDKey,...)
>>If you want them change, you can use
>>oMyForm.CallChildForm(¶ms)
>>and fill the params variable by a string containing whatever values you want in the standard VFP format.
>>
>>HTH.
>>
>>>it that the only way to do it? is there a way to pass data between forms through menus?
>>>
>>>>Hi!
>>>>
>>>>You can temporary define the public variable that will store the reference to the object you want, than access that object in the menu commands.
>>>>
>>>>HTH.
>>>>
>>>>>g'day,
>>>>>
>>>>>how can you pass data ( such as a calling form object referance ) through a shortcut menu ( or anymenu for that matter )?
>>>>>
>>>>>I've tried adding a Lparameters statement to the menu procedure and then on right click < do ShourtcutMenu.mrp with this to that >, but Error not paraemters statment found ( because the first line to execute on right click is are define pad functions )
>>>>>
>>>>>would i need modifiy the code from from the menu designer or is there another way of doing it?
>>>>>
>>>>>thanks
>>>>>- jer
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform