FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Cerrar shellexecute
Posts: 117
Joined: Sun Oct 08, 2017 12:51 PM
Cerrar shellexecute
Posted: Thu Feb 09, 2023 07: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
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Cerrar shellexecute
Posted: Thu Feb 09, 2023 09:09 PM
hi,

you can "close" a Window when know it´s "Title"
Code (fw): Select all Collapse
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

Continue the discussion