FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Kill a task
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Kill a task
Posted: Tue Mar 08, 2011 11:03 AM

Hi,
I have to kill "Adobe Reader" that remains open after a print.

   ShellExecute( 0, "print", cFile1 , "" ,"" , 0 )

In this way I obtain list of all active task

LOCAL aTasks := GetTasks()
LOCAL i
LOCAL cEleTask := ""
FOR i := 1 TO LEN(aTasks)
IF aTasks[ i ] == "Adobe Reader"

ENDIF

NEXT i
RETURN NIL

The question is: How to kill Adobe Reader?

Best regards
Marco

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Kill a task (SOLVED)
Posted: Tue Mar 08, 2011 01:56 PM

SendMessage( FindWindow( 0, "Adobe Reader" ), WM_CLOSE )

Many Thanks

Marco Boschi
info@marcoboschi.it

Continue the discussion