richATrichardjones
Technical User
Hello all
Sorry if this is a simple question but I am a java man and new to Visual Studio
I have a form where I have created a button which opens a file dialog. I want to input the file that is selected into another text box on the form. I cannot seem to convert from stream to text. How do i do this?
The code I using for this so far is:
==========================================
Stream* myStream;
OpenFileDialog* openFileDialog1 = new OpenFileDialog();
openFileDialog1->InitialDirectory = S"D:\\";
openFileDialog1->Filter = S"Media files (*dif)|*.DIF" ;
if(openFileDialog1->ShowDialog() == DialogResult::OK){
if((myStream = openFileDialog1->OpenFile())!= 0){
// This sort of thing below but this gives the
//object name.
// textBox1->Text = myStream->ToString();
myStream->Close();
}
}
==========================================
Thanks in advance
Richard
Sorry if this is a simple question but I am a java man and new to Visual Studio
I have a form where I have created a button which opens a file dialog. I want to input the file that is selected into another text box on the form. I cannot seem to convert from stream to text. How do i do this?
The code I using for this so far is:
==========================================
Stream* myStream;
OpenFileDialog* openFileDialog1 = new OpenFileDialog();
openFileDialog1->InitialDirectory = S"D:\\";
openFileDialog1->Filter = S"Media files (*dif)|*.DIF" ;
if(openFileDialog1->ShowDialog() == DialogResult::OK){
if((myStream = openFileDialog1->OpenFile())!= 0){
// This sort of thing below but this gives the
//object name.
// textBox1->Text = myStream->ToString();
myStream->Close();
}
}
==========================================
Thanks in advance
Richard