open a file on the computer [Archive] - C Board

PDA

View Full Version : open a file on the computer


Coding
03-09-2008, 05:56 PM
How is it possible in C++ .NET to open a file on the computer.

Lets say that I am trying to open this file. Is this possible to do. In this case, Wordpad will open.
Thanks



"C:\\WordPadFile.rtf"

Coding
03-09-2008, 06:09 PM
I have tried out to open this like this but when the file is opened. The cmd.exe is also opened. Is this possible to prevent ?


system("C:\\exitfile.txt");

Coding
03-09-2008, 06:22 PM
I found a solution like this. This do seem to work:


System::Diagnostics::Process::Start("C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32");