Hello all,
I want to write a qui program which opens and reads a text file when pressed Open File button. So far, when I click the button Open File Dialog works and I can choose the file to read but I do not know how to read it line by line. The code for click event is below. Can you please tell me what is the next step?
#pragma endregion
private: System::Void open_file_button_Click(System::Object^ sender, System::EventArgs^ e) {
//we use OpenFileDialog to show a file-open dialog box
OpenFileDialog ^ openFileDialog1 = gcnew OpenFileDialog();
openFileDialog1->Filter = "Text Files|*.txt";
openFileDialog1->Title = "Select the File";
// Show the Dialog.
if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
// pop up a message box if user selects a file System::Windows::Forms::MessageBox::Show(L"deneme",L"test",System::Windows::Forms::MessageBoxButtons::OK);
}
}