Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Once again, mimize to system tray?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00288575
Message ID:
00288709
Vues:
12
>>Hi all.
>>
>>I have been scouring archives and have found a lot of threads regarding showing icon apps in the system tray, but I don't think I have found quite how to do what I want.
>>
>>Basically I want to have a program running, monitoring for a file to appear. While monitoring the program needs to be invisible, preferable with a tray icon and no entry on the task bar. Once the file appears, I want to be able to pop up a dialog, process the file, and then go back to monitoring (invisible) mode.
>>
>>Basically, what I would like to do is have a form with a timer runniming minimized which can watch for the file and then maximize when the file is found.
>>
>>I found the file which lets me show icons in the system tray and capture their mouse clicks, etc. but I don't know how to have a form minimize to the system tray, or at least to be invisible so that I can use this other method to display an icon in the system tray.
>>
>
>You need to set _SCREEN.Visible to .F. to make it (and any forms running in the context of it) completely invisible, it'll continue to run as a background process. Once you do this, until you make it or some top-level window appear visible with a WindowState of 0 or 2, interacting with it will be probelmatic, so I'd look to have something minimize into the icon tray...

Okay, this works... mostly. I still have a few questions:
1. My program is running happily in the background, and sees the file I am looking for. It then creates a top-level form which shows that the file has appeared and needs to be processed. The problem is that it comes up behind everything. I need to make it pop up on top as the active application. How can I do that.

2. For some reason, when my top-level form pops up, it has the default windows icon instead of the icon I attached to it? How can I change that icon.

3. The program is running happily in the background, and the user shuts down windows. How can I make my application shut down with everything else rather than giving a "Cannot close visual foxpro" error?

Thanks again!
Paul R. Moon
Business Software Solutions
paul@businessoftware.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform