a simple help pls???

D

den.NET

actually,it is a very basic and simple question but i need to ask to
whom may know.i am a newbie in c++.NET 2003 and i am so embressed to
ask the question :blush:ops: .
now,i have a output box that have some values written in it..and i
created a "save button".but i couldnt figured out how to say to save
the string(including values) in the outputbox?i mean yes it
works.when i press the button a save file dialog opens and i give a
name.but it does not save anything!how can i say it to save the data
in the outpubox?.i will give u the code of the button;

private: System::Void button1_Click_1(System::Object * sender,
System::EventArgs * e)
{
Stream* myStream ;

SaveFileDialog* saveFileDialog1 = new SaveFileDialog();

saveFileDialog1->Filter = S"txt files (*.txt)|*.txt" ;
saveFileDialog1->FilterIndex = 2 ;
saveFileDialog1->RestoreDirectory = true ;

if(saveFileDialog1->ShowDialog() == DialogResult::OK)
{
if((myStream = saveFileDialog1->OpenFile()) != 0)
{

myStream->Close();
}
}



}


where will i say to save the string in the output box.my outbox is
like;
degree 90 24.233 16
segment 12 11 12.447
degree 85 20.123 11
segment 10 17 10.212
..
..
..
but the saved file has nothing (since i dont know how to say to write
these outputext box values?).pls help me.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
L

Lars-Erik Aabech

Look into the System.IO.TextWriter and System.IO.TextReader objects. They
are specialized Stream objects for text loading and writing. :)

HTH,
Lars-Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top