C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 03-09-2008, 05:56 PM   #1
Registered User
 
Join Date: Dec 2007
Posts: 380
open a file on the computer

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


Code:
"C:\\WordPadFile.rtf"
Coding is offline   Reply With Quote
Old 03-09-2008, 06:09 PM   #2
Registered User
 
Join Date: Dec 2007
Posts: 380
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 ?

Code:
system("C:\\exitfile.txt");
Coding is offline   Reply With Quote
Old 03-09-2008, 06:22 PM   #3
Registered User
 
Join Date: Dec 2007
Posts: 380
I found a solution like this. This do seem to work:

Code:
 System::Diagnostics::Process::Start("C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32");
Coding is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Structure Eror prominababy C Programming 3 01-06-2009 09:35 AM
opening empty file causes access violation trevordunstan C Programming 10 10-21-2008 11:19 PM
Memory Address kevinawad C++ Programming 18 10-19-2008 10:27 AM
Formatting a text file... dagorsul C Programming 12 05-02-2008 03:53 AM
Game Pointer Trouble? Drahcir C Programming 8 02-04-2006 02:53 AM


All times are GMT -6. The time now is 08:40 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22