>I'm trying to activate a popup menu when a button on a toolbar is pressed.
>The menu should appear near the mouse, and the code I'm using is quoted
>below.
>
>This works fine, providing there are no forms open in the application. If a form is open, then the menu appears relative to the currently active form.
>
>I thought that DEFINE POPUP...IN SCREEN would get around that, but it
>doesn't. Anyone know how to get around this. I'm seeing this in VFP 6.
>
>DEFINE POPUP coshhpopup FROM mrow(_screen.name), mcol(_screen.name) ;
> IN SCREEN SHORTCUT
>DEFINE BAR 1 OF coshhpopup PROMPT "Coshh Assessment"
>DEFINE BAR 2 OF coshhpopup PROMPT "Substance Data"
>DEFINE BAR 3 OF coshhpopup PROMPT "LEV Assessment"
>DEFINE BAR 4 OF coshhpopup PROMPT "Occupational Exposure"
>
>ON SELECTION BAR 1 OF coshhpopup do form coshhgrid
>ON SELECTION BAR 2 OF coshhpopup do form substancgrid
>ON SELECTION BAR 3 OF coshhpopup do form levgrid
>ON SELECTION BAR 4 OF coshhpopup do form occgrid
>
>ACTIVATE POPUP coshhpopup
Hi Matt,
I think what happens is that there is some confusion over trhe screen positions due to another font being in use in the other form (or something like that).
I built some code to handle this into my amazing menu class (unfortunately this later version is not available on the UT yet).
Email me (
mark@hidb.com) and i'll send you some code this evening when I get home.