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