Thanks for the reply Eric.
Actually i've not added much of code.
anyway if u have foxpro8 then try just copy systray.vcx from its original location
(d:\program files\microsoft visual foxpro 8\samples\solution\toledo\systray.vcx)
to any of ur local working folder and create a form and add systray control to form
my property settings for systray are
systray1.menutext="1;restore;2;start;3;stop"
and rest of values defaults.
and its processmenuevent i've following code
LPARAMETERS nMenuItemID
DO CASE
CASE nMenuItemID=1
*!* display tracker again
WITH _screen
.Visible= .T.
.WindowState= 2
ENDWITH
CASE nMenuItemID=2
*!* stop worktime
Thisform.cmdstop.click()
CASE nMenuItemID=3
*!* start worktime
Thisform.cmdstart.click()
CASE nMenuItemID=4
*!* exit tracker
Thisform.bexit1.click()
DO exitapp
OTHERWISE
WAIT CLEAR && added by rajani on 01/04/2004
ENDCASE
only thing i wanted was when user minimize our appl i want to our appl to be available on systray only not on task bar so i added following code to main()
*!* adding special events to _screen to use systray class, added by rajani on 31/03/2004
PUBLIC goScreen
goScreen=ScrEvents() && create _screen object
BINDEVENT(_screen, "resize", goScreen, "Scrresize")
***** end
and code in ScrEvents() is
RETURN CREATEOBJECT('ScrEvents') && return object with all methods
DEFINE CLASS ScrEvents AS custom
*!* following is resize event for _screen object.
PROCEDURE scrresize
IF _SCREEN.WindowState = 1
*!* "Window is Minimized"
_screen.Visible= .F.
ELSE
*!* "Window is Restored"
_screen.Visible= .T.
ENDIF
ENDPROC
ENDDEFINE
everything works fine as long as i select some menu item from systray icon click.
if i click on systray icon dont select any menu item then starts troubles
> Given the lack of responses, I suggest you post some code that we can use to reproduce the problem. Thanks.
> --
> Eric den Doop
>
www.foxite.com - The Home Of The Visual FoxPro Experts
cheers