Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invisible form to use as an NT Service
Message
 
À
10/11/2000 17:19:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00440518
Message ID:
00440539
Vues:
14
>>>>I am trying to create and app that will be turned into a service (using srvany). I have one form with a timer that checks every so often for certain files. The problem is that even though the visible property of the form is set to .f. it resets itself to .t. and is visible. Basically I have main.prg that says 'do form frmmain' followed by a read events.
>>>>
>>>>The form runs but is visible. Anyone have any idea what I am doing wrong?
>>>
>>>Have you included SCREEN=OFF in your CONFIG.FPW?
>>
>>No, I hadn't tried that because I wanted the screen available in case I wanted to bring up the debugger or something. Should not the screen be there with an invisible form if the form.visible=.f.?
>
>OIC. When I saw you wanted to create an NT Service, I thought you wanted the entire application to be invisible.
>
>Hmm... I don't know if you can do what you're trying to do. VFP might want something to have the focus, and for that to happen it must be visible.
>
>You could try programmatically adding an object to _Screen and working with that. Is it *just* a timer you need, or is there other stuff on the form?

Well, you are right, when I am done I want the entire app to be invisible. Was just trying to have the form invisible but the _screen visible for debugging purposes. It's Friday and my brain isn't working properly :)

I was thinking about doing it programmatically but needed this first version done by this afternoon and figured I would do a quick and dirty. The only things I have on the form are a timer and a command button. When the timer fires it calls a method on the form that checks for some files, does some stuff if they exist, and then goes back to sleep until the next timer event. One of the files that it checks for is a file named 'stop'. If it sees that one it is supposed to make the window visible so that I can shut it down rather than rudely killing the service. The button merely holds the commands 'thisform.release' and 'clear events'

Thanks for your quick replys...especially on a Friday afternoon (grin)
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform