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: 40985 # Views: 67 # Ratings: 0
Version: Visual FoxPro 8 Category: Classes and Objects
Date: Tuesday, April 13, 2004 11:18:47 PM         
   


Thank u so much Eric.You are a good man.
I tried ur idea but i got error like lotempform not an object.ofcourse i got same error when first started
my program also.but it worked when i changed variable (in systray.showmenu())
from lcClassLib = "systray.vcx" to lcClassLib = "src\class\systray.vcx"

from then on it worked but only for sometime.
i fedup up with it so i tried different approach.i tried same approach and same code (suggested systray Double-click example)
it is even worse it works only develop mode but when i make build and try it runtime nothing happens.
when i click on systray icon it does not respond at all.But it works perfectly in develop.

> Sorry, I can't reproduce the problem. Here's the code I wrote to create your environment. Please use it and see if you see the same behavior with my code.
>
> CLOSE ALL
> CLEAR ALL
> ERASE systrayproblem.*
> * create form
> SET CLASSLIB TO HOME() + "Samples\Solution\Toledo\systray.vcx"
> MODIFY FORM systrayproblem NOWAIT
> ASELOBJ(aaa,1)
> aaa[1].AddObject("systray1", "systray")
> aaa[1].systray1.iconfile = HOME() + "Graphics\Icons\Misc\bullseye.ico"
> aaa[1].systray1.menutext="1;restore;2;start;3;stop"
> * create event code
> TEXT TO m.eventcode
> LPARAMETERS nMenuItemID
> DO CASE
> CASE nMenuItemID=1
> 	WITH _screen
> 		.Visible= .T.
> 		.WindowState= 2
> 	ENDWITH 
> CASE nMenuItemID=2   
> CASE nMenuItemID=3   
> CASE nMenuItemID=4
> OTHERWISE 
> 	WAIT CLEAR
> ENDCASE
> ENDTEXT
> * save event code
> aaa[1].systray1.writemethod("processmenuevent", m.eventcode)
> *
> aaa[1].writemethod("queryunload", "CLEAR EVENTS")
> * save scx
> KEYBOARD '{CTRL+W}'
> DOEVENTS
> * create main prg
> TEXT TO m.mainprg
> SET CLASSLIB TO HOME() + "Samples\Solution\Toledo\systray.vcx"
> PUBLIC goScreen
> goScreen=CREATEOBJECT('ScrEvents')
> BINDEVENT(_screen, "resize", goScreen, "Scrresize")
> DO FORM systrayproblem
> * minimize to tray
> _screen.WindowState = 1
> READ EVENTS
> DEFINE CLASS ScrEvents AS custom 
> 	PROCEDURE scrresize
> 		IF _SCREEN.WindowState = 1
> 			_screen.Visible= .F.
> 		ELSE
> 			_screen.Visible= .T.
> 		ENDIF
> 	ENDPROC
> ENDDEFINE
> ENDTEXT
> * save main prg file
> STRTOFILE(m.mainprg, "systrayproblem.prg")
> * run main prg file
> DO systrayproblem.prg
> 

> --
> 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