Click to See Complete Forum and Search --> : How can I open text file to the screen


autostrad
December 17th, 2009, 10:40 PM
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.


private: System::Void ShwCrdBtn_Click(System::Object^ sender, System::EventArgs^ e)

{
FileInfo^ fi = gcnew FileInfo("C:\\MyFile.txt");
fi->OpenRead();

}

hoxsiew
December 17th, 2009, 10:41 PM
Wrong forum. Ask in the managed C++ forum.

cilu
December 18th, 2009, 03:17 AM
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?

cilu
December 18th, 2009, 03:17 AM
[ redirected ]