Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make a VFP exe become an win2k service
Message
De
22/11/2001 09:02:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00584505
Message ID:
00584894
Vues:
30
Thanks Sergey,

I changed prg's logic. Its works fine as below, but if I change Application.Visible to .F., it starts, appears in win2k task manager list, but does nothing.

Any idea? I'm not sure about the read events loop I did, too.
 Application.Visible = .T.  && There is a screen=off in config.fpw
 On ShutDown Quit

 nMessage = 0

 Do While .T.
    Do CriaObj
    Read  Events
 EndDo

 Quit

* -------------------------------------------

 Procedure CriaObj

 oMailLoop = CreateObj ("frmMailLoop")
 oMailLoop.Show (1)
 
 EndProc && CriaObj

* -------------------------------------------

 Function SendMapiMail
 LParameters pMessage

 . . .

 EndFunc && SendMapiMail

* -------------------------------------------

 Define Class frmMailLoop as Form

        Height = 20
        Width  = 20
        Name   = "frmMailLoop"

        Add Object tmrCycleTimer as Timer with Interval = 10000, Enabled = .F.

        Procedure tmrCycleTimer.Timer
                  ThisForm.tmrCycleTimer.Enabled = .F.
 
                  nMessage = nMessage + 1
 
                  SendMapiMail ("This is message #" + lTrim (Transform (nMessage, "999,999")))
 
                  ThisForm.tmrCycleTimer.Reset ()
                  ThisForm.tmrCycleTimer.Enabled = .T.
        EndProc
 
        Procedure Activate
                  ThisForm.tmrCycleTimer.Enabled = .T.
                  ThisForm.tmrCycleTimer.Timer ()
        EndProc

 EndDefine
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform