Greetings.
I am Ralez.
It's not a problem.
WinExec is what I've used so far, and it works great for at least
Delphi 3, and I find it hard to believe that it doesn't for Delphi 2.
Here's how it works:
(Quite Simple)
WinExec('C:\Windows\Command.com', 1);
You can also do something like
WinExec('C:\Windows\Command.com', SW_SHOW);
I'm not sure if that second WinExec example of mine works, but the
first one certainly does. :)
but I like using the integer instead. I'm terrible with names but I
can remember every number in the world for as long as I like, so
experimenting with that integer is far more successful. ;) There are
methods to make them run minimized and maximized and all kinds of
things. This is the normal type, I've never had to use it any
differently. I can't remember what's used instead of the integer.
Now, if you wanna open directories, that's no problem. What you do is
that you open Explorer.exe with the directory as a parameter. This is
what you might as well type in the Run dialog box that's built into
Windows's Start Menu.
WinExec('Explorer C:\', 1);
This will open up the "C:\" directory. :) You'll figure it out from
here, unless you're impossibly stupid, which I seriously doubt you
being. Anyway, programs opened with WinExec are compatible with the
PATH system variable, meaning that all programs in e.g. C:\Windows and
C:\Windows\System and C:\Windows\Command are executable without a
path. "WinExec('notepad', 1);" will open up Notepad, and you don't
need to put in the entire path location of Notepad.exe, since it's in
a directory that is contained in the PATH system variable. :) You know
what this means if you've ever checked out your Autoexec.Bat.
Hope this helps.
Peace, brother.
Ralez Armon
ralez @ islandia . is
On Sat, 9 Jan 1999 00:19:27 -0600, "Woody" <woody....@ih2000.net>
wrote:
Quote
>Use the ShellExecute API call to do either one.
>--
>Woody
>Paul <eat-s...@vindaloo-fish.chicken-chow-mein.com> wrote in message
>news:7763hm$ehe$1@nclient3-gui.server.ntli.net...
>>Hello,
>> I would like to know if it is possible to Open Folders (like the
>>root C:\ or something) by the click of a Button, and what code should i
>use?
>>Also is it possible to execute external programs by the click of a button
>>and/or when the main form loads?
>>Any help would be greatly appreciated.
>> Paul Hempshall
>>PS. Im using Delphi 2.