Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetForegroundWindow behavior frustrating
Message
De
08/05/2003 18:04:27
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
SetForegroundWindow behavior frustrating
Divers
Thread ID:
00786521
Message ID:
00786521
Vues:
83
I have an application that runs as the only user-available application (kind of like a kiosk). When the user logs in to the network, my VFP application starts up via a shortcut in the Startup group. The problem is that there is some background task running that takes the focus away from the VFP app. Since our application is using a keyboard wedge-connected barcode scanner we need to keep the application in the foreground or the simulated keystrokes get sent to the desktop or anywhere other than our VFP app.

I thought I would just issue a SetForegroundWindow API call every second or so. The problem is that instead of bringing itself to the front and activating the window it merely makes the taskbar icon for the app flash. Now, this seems to agree with the documentation for this API call in the MSDN articles I have read but that's not what I want. The users of this app rarely ever use a mouse so I want to avoid the necessity of telling them to click on my form (or the taskbar icon) if the barcode data doesn't show up in the field.

I am running on Windows XP Pro. Any help would be appreciated.
Larry Huisingh
Lockheed Martin Information Technology
Richland WA USA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform