Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display .dat file in text box

Status
Not open for further replies.

sprnova

Programmer
Oct 17, 2007
1
BB
Hi, I trying to open a Random Access File in a mulitline textbox the file has records stored in lines and columns. I am new to .NET so I don't know all the functions as yet but here is what I tried(doesn't work)
Code:
private: System::Void OnClickedDisplay(System::Object *  sender, System::EventArgs *  e)
		 {
			StreamReader *StreamReader1;
			StreamReader1 = new StreamReader(textBox1->Text->ToString());//The file is already opened and the filename is displayed in textbox1
			this->textBox2->Text=StreamReader1->ReadToEnd();//Display stream in textbox2
			StreamReader1->Close();
		 }
 
Why do you have Void with a capital {b}V[/b]? Do you have it defined as a data type, or #define?

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top