Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AppActivate equivalent
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00094519
Message ID:
00094664
Vues:
26
>>>I'm sending some commands to another application via DDE. When I did this with this particular application through VB, I found I needed to 'AppActivate' the DDE server in order for the commands to complete smoothly. I cannot seem to find an equivalent operation in VFP5 (makes a specified program the foreground application, while the VFP app drops to the background).
>>>
>>>Any clues?
>>
>>Either SetForegroundWindow() or BringWindowToTop() should work. Both require the handle of the window that you desire to activate.
>
>Thanks, but I need a little more. They're not VFP commands (not in 5.0, anyway) so I presume I need to call it from FoxTools, or something?

They're Windows API calls. Here are the declarations:
DECLARE SHORT SetForegroundWindow IN Win32API;
  INTEGER hWnd
DELCARE SHORT BringWindowToTop IN Win32API;
  INTEGER hWnd
For another application, you can get its window handle using the Is_Ruin32 function from the download section (Win32 and other APIs) here at the UT. Foxtools has MainhWnd() to return the main window handle for FoxPro.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform