Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting a VFP Window to be on top of all other windows
Message
De
28/03/2000 14:29:44
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Getting a VFP Window to be on top of all other windows
Divers
Thread ID:
00351538
Message ID:
00351538
Vues:
45
I am writing an application in VFP 6.0 to run on WinNT workstations. My app runs "behind the scenes" in that it reads a text file created by another app, does a bunch of verifications and returns a pop-up window (the only part of my app that's visible) to the end user letting them know if the text file is valid or not. I have the following code in my app to call a form window, but it doesn't return focus to my form. I would like the user to be able to hit the Enter key when they see the form to close my form and return focus to the other application. As it stands right now, the user has to click on the "OK" button to close my form.

Code in frmMessage.init:
***********************************
lparameters cText, cTitle
local lnHandle

DECLARE INTEGER ShowWindow IN WIN32API INTEGER hWnd, INTEGER ShowWindowMode
DECLARE INTEGER GetActiveWindow IN WIN32API

lnHandle = FindWindow(0, 'frmMessageForm')

=ShowWindow(GetActiveWindow(),5)

this.caption = cTitle
thisform.txtMessageText.caption = cText
thisform.cmdOK.setfocus
***********************************

Any ideas on how I can get my form to be the active window on my screen?

Thanks,

Joe
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform