FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour execute a windows function
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
execute a windows function
Posted: Sat Jun 27, 2015 10:40 AM
How I can call the function OpenWith of the Windows (in this case Win xp professional)


I try with ShellExecute(0, nil, cfile) but not run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: execute a windows function
Posted: Sat Jun 27, 2015 07:19 PM

Silvio,

Have you looked for ShellExecute examples on these forums ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: execute a windows function
Posted: Sun Jun 28, 2015 12:14 AM
Silvio,

Code (fw): Select all Collapse
ShellExecute(0, 0, "test.jpg", 0, 0, 1 )


-Ramesh Babu
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: execute a windows function
Posted: Mon Jun 29, 2015 06:41 AM

Dear Antonio,
I tried all sample I found in this forum

Dear Ramesh Babu,
it not run, it open the test.jpg with the last Exe opened with a jpg file

I wish open the OpenWith list dialof of Window

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: execute a windows function
Posted: Mon Jun 29, 2015 07:31 AM
Hello,

On Vista there is SHOpenWithDialog
For Xp, according with:
http://stackoverflow.com/questions/22177851/shopenwithdialog-analog-for-windows-xp you should call:
Code (fw): Select all Collapse
ShellExecute(hWnd, "open", "Rundll32.exe", "shell32.dll,OpenAs_RunDLL "+cFileName, 0, 5/*SW_SHOW*/)


Regards,
Antonino
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: execute a windows function
Posted: Mon Jun 29, 2015 09:00 AM

thank
and with Winseven run the same ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: execute a windows function
Posted: Mon Jun 29, 2015 02:04 PM

on Windows Seven 64 bit this command not run and change the association file and then not open the file

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion