Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON SHUTDOWN command - SysTray application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
ON SHUTDOWN command - SysTray application
Divers
Thread ID:
00822650
Message ID:
00822650
Vues:
54
Hello: (first all, sorry by my poor english)

I'm having a problem with an application running in the System Tray when I try to close the Windows session or when I try to shutdown Windows.

When I select "Start|Close Session or Shutdown", the VFP application running in SysTray is closed but the Windows session keeps active.
Am I clear?? It means that I need to do "Start|Close Session" twice to get it.
I think the problem is in the ON SHUTDOWN command but I can't find where is it.

Here is a sample code: create a PRG and run it (DO xxx.prg). Then when it's running, shutdown Windows.
_Screen.Visible = .F.
SET TALK OFF
SET CONFIRM ON
SET ESCAPE OFF
SET DELETED ON
SET EXCLUSIVE OFF
SET MULTILOCKS ON
SET SYSFORMATS ON
ON SHUTDOWN Clear Events
LOCAL oST
oST = CREATEOBJECT( "mySysTray" )
READ EVENTS
ON SHUTDOWN
CLOSE ALL
CLEAR ALL
Quit

*****************************

DEFINE CLASS mySysTray AS Systray OF HOME()+"\Samples\Solution\Toledo\Systray.vcx"
    IconFile = HOME() + "\Graphics\Icons\Misc\face02.ico"
    TipText = "Prueba de SysTray"

    PROCEDURE IconDblClickEvent
        IF MESSAGEBOX("Do you really want to quit?",4+32+256,"Test of SysTray")=6
            CLEAR EVENTS
        ENDIF
    ENDPROC
ENDDEFINE
NOTE: I'm working with VFP8 on WinXP Prof. SP1 (with all available updates)

Thank you in advance.

Esteban Bruno
Lic. Esteban Bruno
Gerente de Sistemas
TASSO S.R.L.
Répondre
Fil
Voir

Click here to load this message in the networking platform