Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Current Window Title
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00216674
Message ID:
00216680
Vues:
28
>I want my Foxpro (VP6) program to be running in the background knowing what the title of the window the user is looking at. Can be any other window application
>
>The way I figure it is to have a timer running making API calls every so often to see what window the user is looking at ... but what API?
>
>Any hints ?
>
>Thanks
Hi James,

The following should do what you're looking for:
DECLARE INTEGER GetActiveWindow IN Win32API
DECLARE INTEGER GetWindowText IN Win32API ;
  INTEGER hwnd, STRING @lptstr, INTEGER cbmax
lnhWnd = GetActiveWindow()
lctitle = SPACE(200)
lnlen = LEN(lctitle)
lnlen = GetWindowText(lnhWnd, @lctitle, lnlen)
IF lnlen > 0
  lctitle = LEFT(lctitle, lnlen)
ENDIF
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