Code isn't magic. It wont automatically bring up a load dialog just because something is named open.
You need to provide code to show the dialog. There is some way of generating the open and save dialogs from the designer, but I havn't touched managed code in over a year now so I don't remember.
This is the code from my latest C++/CLI assignment with a few changes to fit your solution.
namespace MoviePlayer {
public ref class Player : public System::Windows::Forms::Form {
private: System::Windows::Forms::OpenFileDialog^ FileLoadDialog;
void InitializeComponent(void) {
this->FileLoadDialog = (gcnew System::Windows::Forms::OpenFileDialog());
this->FileLoadDialog->Title = L"Load File";
}
private: System::Void openToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
FileLoadDialog->DefaultExt = "avi";
FileLoadDialog->Filter =
"All Video Files (*.avi;*.mkv)|*.avi;*.mkv|"
"AVI Files (*.avi)|*.avi|"
"Matroska Files (*.mkv)|*.mkv|"
"All Files (*.*)|*";
if (FileLoadDialog->ShowDialog() == ::DialogResult::OK) {
OpenMovie(FileLoadDialog->FileName);
}
}
}
}