Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menus Do Not Appear when _VFP.Visible=.F.
Message
From
14/11/2001 10:23:31
 
 
To
14/11/2001 07:35:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00581403
Message ID:
00581505
Views:
13
Hi!

I did managed to do this with some effort.

First of all, create a top-level form with no title bar and controls in it. When clicking on tray icon, you will display that form and then shortcut menu in it. You will have to play a bit around the form position size to make form size and location exactly the same as shortcut menu window size and exactly as required to show menu above the tray icon. You can try to use API functions to do not display form in the taskbar (I do not remember how I solved this one ;( ).

There is another problem. User will not be able to select anything until ActiveX event finished. But it will not finish when you will use "Activate" command for shortcut. the solution here is to use timer. Place a hidden form and timer on it. Start timer from the ActiveX event. In the timer event code stop timer and launch the shortcut menu form. THis way you will be sure form and mmenu are activated just from the VFP code, not from ActiveX event.

HTH.

>Hi,
>
>I have an application that runs invisible (with _VFP.visible=.f.
>and SCREEN=OFF in config.fpw)
>
>The program uses systray.ocx to show an icon on the task tray.
>When I click on the task tray I want a menu.
>
>SO I call the following code from the click event on the systray
>control:
>
>
>*** ActiveX Control Event ***
>LPARAMETERS button
>SET STEP ON
>IF button=2
>
>	DEFINE POPUP Smenu STYLE 'N'
>	DEFINE BAR 1 OF SMenu PROMPT "Quit"
>	ON SELECTION BAR 1 OF SMenu MESSAGEBOX("OK")
>	ACTIVATE POPUP SMenu
>	
>ENDIF
>
>
>
>So the question is: How can I get only the menu to appear when the application
>is running completely invisible?
>
>
>thanks
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