dBASE Programming - How to issue proper run()

This is Interesting: Free IT Magazines  
Home > Archive > dBASE Programming > April 2004 > How to issue proper run()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to issue proper run()
Sharlene England

2004-04-18, 10:54 am

I have asked for the users input to determin a path;

I end up with a variable called myfile which contains something like
this

\\carmin\archives\70200\70220\acad\20e30
01.dwg

Now I want the user to be able to press a button and that will do a "double
click" on the file.

As if the user went through windows explorer or my computer to get to that
path and then double clicked the file.

I want the windows operating system to know what to open the file with and
if it doesn't it should ask open with what?

Same as windows explorer does.

I have tried
run(true,myfile)
and this does not work, I get an error saying version conflict.

Thanks for any and all responses.

Sincerely,

Sharlene England
Network Administrator
Westwood Companies
Vernon, BC, Canada


Sharlene England

2004-04-18, 10:54 am

I have moved this post to the dde-ole-dll-winapi newsgroup with further
information.

Thanks.
>



Sharlene England

2004-04-18, 10:54 am

I have moved this post to the dde-ole-dll-winapi newsgroup with further
information.

Thanks.


Howard Mintzer

2004-04-18, 10:54 am

Hi Sharlene

Here's how I do it. The code was from someone else here (Romaine I
think). I use it to open a lab report which might be a jsp, bmp, jpg or
other format. My routine is called OpenExternalFile. You just call this
code from the onClick event of your pushbutton.


function OpenExternalFile(myFile)

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

if type('ShellExecute') # 'FP'
extern chandle ShellExecute(chandle, cstring, cstring, cstring, ;
cstring, cint) shell32 ;
from "ShellExecuteA"
endif

if not empty(myFile)
ShellExecute( 0, 'open', cFile, '', '', SW_SHOWDEFAULT)
endif

return
Howie


Sharlene England wrote:

>I have asked for the users input to determin a path;
>
> I end up with a variable called myfile which contains something like
>this
>
> \\carmin\archives\70200\70220\acad\20e30
01.dwg
>
>Now I want the user to be able to press a button and that will do a "double
>click" on the file.
>
>As if the user went through windows explorer or my computer to get to that
>path and then double clicked the file.
>
>I want the windows operating system to know what to open the file with and
>if it doesn't it should ask open with what?
>
>Same as windows explorer does.
>
>I have tried
> run(true,myfile)
>and this does not work, I get an error saying version conflict.
>
>Thanks for any and all responses.
>
>Sincerely,
>
>Sharlene England
>Network Administrator
>Westwood Companies
>Vernon, BC, Canada
>
>
>
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com