Re: Button to launch files
Use CreateProcess API or ShellExecute (or ShellExecuteEx)
Re: Button to launch files
Quote:
Originally Posted by
weirddemon
Hi,
I'm new to C++ and I came from VB .Net
I'm using Microsoft Visual C++ Express 2008 and I am trying to launch files from a button.
In VB .Net, I did this way:
Code:
Dim myProcess As New Process
myProcess.StartInfo.WorkingDirectory = "Files"
myProcess.StartInfo.FileName = "Test.exe"
myProcess.Start()
My program will be used across multiple PCs so I had to set the directory of where the file was located then call forth the name of the file in the next line. I was wondering how I would do that in Visual C++.
Thanks
See
(A newbie's elementary guide to spawning processes)
http://www.codeproject.com/KB/system/newbiespawn.aspx