Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make a VFP exe become an win2k service
Message
From
22/11/2001 09:02:53
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00584505
Message ID:
00584894
Views:
29
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform