Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
- Stream^ myStream;
- openFileDialog1->Filter = "Текстовые файлы (*.txt)|*.txt|Все файлы (*.*)|*.*";
- if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
- {
- label1->Text = openFileDialog1->FileName;
- if ( (myStream = openFileDialog1->OpenFile()) != nullptr )
- {
- // Insert code to read the stream here.
- myStream->Close();
- textbox1->text=Convert::ToString(myStream);
- }
- }
- }
- textBox1->Text = System::IO::File::ReadAllText(openFileDialog1->FileName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement