CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    23

    How can I open text file to the screen

    Can anybody tell me how to open (print)a text file to the screen. For example, to click a botton and the file will be shown in the screen. Using something like the code below.
    Code:
       
    
    private: System::Void ShwCrdBtn_Click(System::Object^  sender, System::EventArgs^  e)
     
    {
    FileInfo^ fi = gcnew FileInfo("C:\\MyFile.txt"); 
    fi->OpenRead();
    			 
     }

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    Re: How can I open text file to the screen

    Wrong forum. Ask in the managed C++ forum.

  3. #3
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: How can I open text file to the screen

    What do you mean show the file on the screen? It has to be displayed in a window or window control. Do you want to open it in a notepad instance, or maybe in a control on a form of yours?
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: How can I open text file to the screen

    [ redirected ]
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured