Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: sqlpro
  Where is sqlpro?
 
 New Zealand
 sqlpro
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: systray icon does not respond
Thread ID: 40195 Message ID: 40378 # Views: 95 # Ratings: 0
Version: Visual FoxPro 8 Category: Classes and Objects
Date: Friday, April 02, 2004 3:57:18 AM         
   


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



COMPLETE THREAD
systray icon does not respond Posted by Rajani @ 3/31/2004 7:36:31 AM
RE: systray icon does not respond Posted by Eric den Doop @ 4/1/2004 8:59:25 AM
RE: systray icon does not respond Posted by Rajani @ 4/2/2004 3:57:18 AM
RE: systray icon does not respond Posted by Eric den Doop @ 4/8/2004 7:39:03 AM
RE: systray icon does not respond Posted by Rajani @ 4/13/2004 5:31:44 AM
RE: systray icon does not respond Posted by Eric den Doop @ 4/13/2004 4:20:23 PM
RE: systray icon does not respond Posted by Rajani @ 4/13/2004 11:18:47 PM
I'm facing the same problem :-( Posted by Handi Rusli @ 4/15/2004 6:31:41 AM
Reproducable problem! Posted by Eric den Doop @ 4/15/2004 3:19:30 PM
RE: Reproducable problem! Posted by Rajani @ 4/16/2004 1:22:04 AM
RE: Reproducable problem! Posted by Steve Supinski @ 5/17/2004 11:31:01 PM
RE: Reproducable problem! Posted by Eric den Doop @ 5/18/2004 12:11:00 AM
RE: Reproducable problem! Posted by Steve Supinski @ 5/18/2004 12:49:34 AM
RE: Reproducable problem! Posted by liquid_picnic anon @ 10/13/2004 4:37:45 AM
Additional Information Posted by Craig Boyd @ 10/13/2004 5:41:46 AM
Any Solution to this? Posted by Ken Blum @ 12/23/2004 5:25:36 PM
RE: Any Solution to this? Posted by Eric den Doop @ 12/23/2004 10:44:24 PM
RE: Any Solution to this? Posted by Ryan Hinton @ 12/24/2004 9:43:54 AM
RE: Any Solution to this? Posted by Eric den Doop @ 12/24/2004 11:34:30 AM
RE: Any Solution to this? Posted by Ken Blum @ 12/29/2004 2:03:24 PM
RE: systray icon does not respond Posted by Jagdish Angre @ 2/6/2008 1:00:17 AM