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(2023
> > ),1)
> >
> > This doesn't
> > ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,"",Sys(2023
> > ),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/[email protected]
** 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.

Reply via email to