FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ShellExecute does not open in a window
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
ShellExecute does not open in a window
Posted: Wed May 09, 2018 05:54 PM
Hello everyone,

I need to use shellexecute to open an outlook application or an html file and assign it to a window,
but what it does is open the application or the html file in a new window.
I am using this code

Code (fw): Select all Collapse
#include "fivewin.ch"

//------------------------------------//

#define SW_HIDE                         0       
#define SW_SHOWNORMAL           1       
#define SW_SHOWMINIMIZED        2       
#define SW_MAXIMIZE                 3   
#define SW_SHOWMAXIMIZED        3       
#define SW_SHOWNOACTIVATE   4       
#define SW_MINIMIZE                 6       
#define SW_SHOWMINNOACTIVE  7       
#define SW_SHOWNA                   8   
#define SW_RESTORE                  9       
#define SW_SHOW                       5     
#define SW_SHOWDEFAULT       10   

//------------------------------------//

Function Main()
    Local oWnd
    Local cTitle := "Main Principal"
    Local cURL   := "mailto:email@domain.com" // cFilePath( GetModuleFilename( GetInstance() ) ) + "btkserver.htm"
        
    DEFINE WINDOW oWnd TITLE cTitle
          
    ACTIVATE WINDOW oWnd; 
        MAXIMIZED;
        ON INIT ShellExecute( oWnd:hWnd, "open", cURL,,, SW_RESTORE )

    // ShellExecute( GetActiveWindow(), "open", cURL,,, SW_RESTORE )
        
Return Nil
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: ShellExecute does not open in a window
Posted: Wed May 09, 2018 07:41 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion