open a file on the computer

This is a discussion on open a file on the computer within the C# Programming forums, part of the General Programming Boards category; How is it possible in C++ .NET to open a file on the computer. Lets say that I am trying ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    383

    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"

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    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");

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    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");

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  3. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  4. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM

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