Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another app instance question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00628296
Message ID:
00628913
Vues:
14
>The old reliable ATasker() function... works every time! Thanks George!!! That should make it a snap to iterate through and count'em up.

You're welcome, Mark. My fear, however, is that what'll be returned is the run-time library or VFP itself on a machine with it installed. At least, that's what seemed to occur in preliminary tests. Here's some code you might find useful for testing
#DEFINE GW_HWNDNEXT 2
#DEFINE GW_CHILD 5
#DEFINE MAX_PATH 260
LOCAL lnhwnd, lcfilename, lnresult
DECLARE INTEGER GetWindow IN Win32API;
  INTEGER hWnd, INTEGER uFlag
DECLARE INTEGER GetDesktopWindow IN Win32API
DECLARE INTEGER GetWindowModuleFileName IN Win32API;
  INTEGER hwnd, STRING @lpszFileName, INTEGER cchFileNameMax
lnhwnd = GetDesktopWindow()
lnhwnd = GetWindow(lnhwnd, GW_CHILD)
DO WHILE NOT EMPTY(lnhwnd)
  lcfilename = SPACE(MAX_PATH)
  lnresult = GetWindowModuleFileName(lnhwnd, @lcfilename, MAX_PATH)
  IF lnresult > 0
    ? LEFT(lcfilename, lnresult)
  ENDIF
  lnhwnd = GetWindow(lnhwnd, GW_HWNDNEXT)
ENDDO
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