The only other thought I have regarding the error, the SYS(2023) might be returning an invalid path causing an error. I didn't think ShellExecute actually throws an error though, it returns a number from 0 to 32 as an error.
If the declaration isn't found, it's possible to get a different error. If you could catch the MESSAGE() inside the CATCH, it will help determine why it's a problem on some machines. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Sytze de Boer Sent: Thursday, October 08, 2009 5:06 PM To: [email protected] Subject: Re: VFP9 - Shellexecute Hi Tracy I'll try your suggestion. Yes, it's word wrap issues. Note the * before return Many thanks Tracy On Fri, Oct 9, 2009 at 9:48 AM, Tracy Pearson <[email protected]> wrote: > Since you are using Try/Catch, you can drop the use of FindWindow and > use _VFP.hWnd. > > ShellExecute(_VFP.hWnd,tcAction,tcFile,"",Sys(2023),1) > > Are you really calling the ShellExecute twice, or is that just word > wrap isses? > > -----Original Message----- > From: Sytze de Boer > Sent: Thursday, October 08, 2009 4:36 PM > > Here is the full routine > > Try > > tcAction='OPEN' > tcFile="http://kingcashbook.com" > Wait Window Nowait 'Opening '+tcFile > > Declare Integer ShellExecute ; > IN SHELL32.Dll ; > INTEGER nWinHandle,; > STRING cOperation,; > STRING cFileName,; > STRING cParameters,; > STRING cDirectory,; > INTEGER nShowWindow > > Declare Integer FindWindow In WIN32API String cNull,String cWinName > > *Return > ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,"",Sys(2023 > ),1) > > ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,"",Sys(2023 > ),1) > > Catch > > =Messagebox("It seems there's a problem connecting to the > internet......",0,'') > > Endtry > > > > > > > On Fri, Oct 9, 2009 at 9:27 AM, Tracy Pearson <[email protected]> > wrote: > > > What message() is in the catch? > > > > Are you directly returning the value of ShellExecute to the calling code? > > Depending on your declaration it might be expecting a logical and > > the declaring returns a numeric. > > > > > > -----Original Message----- > > >From Sytze de Boer > > Sent: Thursday, October 08, 2009 3:52 PM > > Subject: VFP9 - Shellexecute > > > > Some clients were reporting issues with a specific module in my > > system So, I thought I would try something with Try/Endtry > > > > Within the try/endtry routine, this returns an error and goes to > > Catch tcFile="http://kingcashbook.com" > > Return > > ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,"",Sys(20 > > 23 > > ),1) > > > > This doesn't > > ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,"",Sys(20 > > 23 > > ),1) > > > > Within a standard prg or form, both work fine I don't understand why > > > > > > > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000a01ca485f$256799c0$7036cd...@com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

