Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Application info.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00361991
Message ID:
00361996
Vues:
27
>hello,
> Does anyone know how to capture the information about what application is running currently in the win98. where is the information being kept in the window envirement?? thanks
>sherry

Try this,

*--------------------------------------------
FUNCTION ListApp
*--------------------------------------------
* Show info of what apps are running
* in Windows
* USE: ListApp()
*-----------------------------------------------
LOCAL laApp, lnHandle, lnCount, lcTitle, lnI, lnHFox
DIMENSION laApp[1]
lnHFox=0
DECLARE INTEGER FindWindow ;
IN win32api ;
INTEGER nullpointer, ;
STRING cwindow_name
DECLARE INTEGER GetWindow ;
IN win32api ;
INTEGER ncurr_window_handle, ;
INTEGER ndirection
DECLARE INTEGER GetWindowText ;
IN win32api ;
INTEGER n_win_handle, ;
STRING @ cwindow_title, ;
INTEGER ntitle_length
lnHFox = FindWindow(0,_SCREEN.CAPTION)
lnHandle = lnHFox && GetWindow(lnHFox,0)
lnCount = 0
DO WHILE lnHandle > 0
lcTitle=SPACE(255)
lnI=GetWindowText(lnHandle, @lcTitle,LEN(lcTitle))
IF lnI>0
lcTitle=STRTRAN(TRIM(lcTitle),CHR(0),"")
ELSE
lcTitle=""
ENDIF
IF lnHandle > 0 .AND. !EMPTY(lcTitle)
lnCount=lnCount+1
DIMENSION laApp(lnCount)
laApp[lnCount]=lcTitle
ENDIF
lnHandle = GetWindow(lnHandle,2)
ENDDO

IF ALEN(laApp,1)>0
lcString = "The following apps are running:" + CHR(13) + CHR(13)
FOR i=1 TO ALEN(laApp,1)
lcString = lcString + laApp[i]+CHR(13)
NEXT
ELSE
lcString = "There aren't apps running"
ENDIF
=MESSAGEBOX(lcString, "App running list")
RETURN ""
ENDFUNC
Pablo Roca
Clavo Congelados, S.A. (La Coruna - Spain)
Sysop of PortalFox

Join MasFoxPro campaign
http://www.masfoxpro.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform