Cerrar shellexecute

Cerrar shellexecute

Postby pedroluis » Thu Feb 09, 2023 7:46 pm

Hola gente !

Selecciono un archivo con shellexecute y pregunto si quiere o no abrirlo.

Como hago lyego para cerrarlo ?

Por Ejemplo

shellexecute(nil,"open",cfile,,,1)
if ! msgyesno("Planilla Correcta ?","???")
// ¿Como lo cierro si no es la planilla correcta ?........
clos data
return nil
endif
Pedro L. Lavallen
San Luis (Capital), Argentina
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: Cerrar shellexecute

Postby Jimmy » Thu Feb 09, 2023 9:09 pm

hi,

you can "close" a Window when know it´s "Title"

Code: Select all  Expand view
PROCEDURE CloseWindow(cTitle)
LOCAL hWnd := FindWindowEx(,,, cTitle )

IF EMPTY(hWnd)
   MsgInfo("need Title of Windows to close")
ELSE
   IF !( hWnd == 0 )
      SetForegroundWindow( hWnd )
      BringWindowToTop( hWnd )
      ShowWindow( hWnd, 1 )
      UpdateWindow( hWnd )
      SendMessageA( hWnd, WM_CLOSE, 0, 0 )  
   ENDIF
ENDIF
RETURN
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 89 guests