Board index » delphi » Open windows "explorer" window

Open windows "explorer" window

How can I open the Windows explorer ("My Comptuer") to a certain file?
I assume that there is a simple system call, but I cannot seem to find
it.

Thanks for any help.

-John

 

Re:Open windows "explorer" window


Quote
John Baima wrote in message <5idg2vsrieg9nkjlbo52u4naadtap2l...@4ax.com>...
>How can I open the Windows explorer ("My Comptuer") to a certain file?

I don't understand your question.

Quote
>I assume that there is a simple system call, ...

Yes, probably.

Groetjes,
Maarten Wiltink

Re:Open windows "explorer" window


On Fri, 17 Jan 2003 16:59:45 GMT, John Baima

Quote
<j...@REMOVEME.silvershot.com> wrote:
>How can I open the Windows explorer ("My Comptuer") to a certain file?
>I assume that there is a simple system call, but I cannot seem to find
>it.

Explorer isn't a file viewer, but to open on a certain *directory*,
use ShellExecute to run explorer.exe, and pass the path as a
parameter.

--
jc

Re:Open windows "explorer" window


In article <5idg2vsrieg9nkjlbo52u4naadtap2l...@4ax.com>, John Baima

Quote
<j...@REMOVEME.silvershot.com> writes:
>How can I open the Windows explorer ("My Comptuer") to a certain file?
>I assume that there is a simple system call, but I cannot seem to find
>it.

uses
  ShellAPI;

procedure OpenWinExp(FilePathName : string);
var
  Dir : string;
begin
  Dir := ExtractFileDir(FilePathName);
  ShellExecute(0, 'explore', PChar(Dir), nil, nil, SW_SHOW);
  {alternative ...
  ShellExecute(0, 'open', 'C:\Windows\Explorer.exe', PChar('/n,/e,"' + Dir +
'"'), nil, SW_SHOW);}
end;

Look up ShellExecute in Win32.hlp, or place cursor in the word "ShellExecute"
in Delphi and press F1.

Alan Lloyd
alangll...@aol.com

Re:Open windows "explorer" window


Quote
alangll...@aol.com (AlanGLLoyd) wrote:
>>How can I open the Windows explorer ("My Comptuer") to a certain file?
>>I assume that there is a simple system call, but I cannot seem to find
>>it.

>uses
>  ShellAPI;

>procedure OpenWinExp(FilePathName : string);

thank you, that's exactly what I was looking for.

Quote
>Look up ShellExecute in Win32.hlp, or place cursor in the word "ShellExecute"
>in Delphi and press F1.

When I installed D6, I no longer get this--I feel like I'm walking
around blind. Is this an option I missed when installing D6?? It was
there for other versions of Delphi and something I need to look at
from time to time.

Thanks again.

-John

Re:Open windows "explorer" window


Quote
John Baima <j...@REMOVEME.silvershot.com> wrote in message <news:ge3o2vsouafpcq4ll7tb52qru2i62hfqgb@4ax.com>...
> alangll...@aol.com (AlanGLLoyd) wrote:

> >>How can I open the Windows explorer ("My Comptuer") to a certain file?
> >>I assume that there is a simple system call, but I cannot seem to find
> >>it.

> >Look up ShellExecute in Win32.hlp, or place cursor in the word "ShellExecute"
> >in Delphi and press F1.

> When I installed D6, I no longer get this--I feel like I'm walking
> around blind. Is this an option I missed when installing D6?? It was
> there for other versions of Delphi and something I need to look at
> from time to time.

> Thanks again.

> -John

In Delphi  select Help/Customize... click on the folder +
icon and add in the various help files.

HTH,
John

Re:Open windows "explorer" window


Quote
johnrkeb...@hotmail.com (John Kebert) wrote:
>> >Look up ShellExecute in Win32.hlp, or place cursor in the word "ShellExecute"
>> >in Delphi and press F1.

>> When I installed D6, I no longer get this--I feel like I'm walking
>> around blind. Is this an option I missed when installing D6?? It was
>> there for other versions of Delphi and something I need to look at
>> from time to time.

>In Delphi  select Help/Customize... click on the folder +
>icon and add in the various help files.

When I do this, I do not see the Windows reference. Again, I'm not
sure if I did something wrong on install, but I just cannot find it.

-John

John Baima

Re:Open windows "explorer" window


Quote
John Baima <j...@REMOVEME.silvershot.com> wrote in message <news:fc8r2vshdtorpfau087h3dqe5n259rldhm@4ax.com>...

> >In Delphi  select Help/Customize... click on the folder +
> >icon and add in the various help files.

> When I do this, I do not see the Windows reference. Again, I'm not
> sure if I did something wrong on install, but I just cannot find it.

> -John

> John Baima

Have you looked in C:\Program Files\Common Files\Borland
Shared\MSHelp?  Most of the good stuff is in there.

Also if you downloaded the trial version, you will get it in:
C:\Program Files\Borland Delphi Trial Edition
Installer\Install\Common\Borland Shared\MSHelp

Or grab your CD and look in here:
G:\Install\Common\Borland Shared\MSHelp
You can always copy the directory onto your harddrive and go from
there.

HTH,

John

Other Threads