FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour systray and shellexecute
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
systray and shellexecute
Posted: Thu Jun 12, 2008 09:48 AM

Does someone have a sample with systray and shellexecute.

I inserted following code into testtray.prg of the fivewin samples.

Testdlg is executed but not shown.

  MENUITEM "Testdlg" ACTION ( nRet:= Shellexecute(0,0,"c:\FWH\samples\test\testdlg.exe","c:\FWH\samples\test",1),msginfo(nRet))

MENUITEM "winexec" ACTION winexec ("c:\xwinhotel\xwinhotel.exe")
is working. But how can I setup the woring directory?

Thanks in advance
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
systray and shellexecute
Posted: Thu Jun 12, 2008 11:17 AM

Otto,

It seems that you are not using the right parameters when calling ShellExecute:

HINSTANCE ShellExecute(
HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
systray and shellexecute
Posted: Thu Jun 12, 2008 01:49 PM

Antonio,
thank you for your help.
Yes the parameters where wrong.

Regards,
Otto

Continue the discussion