Hi Jochen,
strange. When compiling
private: System::Void openToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^ e) {
if (openFileDialog1->ShowDialog()== DialogResult::OK)
//System::Windows::Forms::DialogResult::OK) // this works
{
richTextBox1->LoadFile(openFileDialog1->FileName);
}
}
I get
1>c:\vs2005\projekt1\projekt1\Form1.h(156) : error C2039: 'OK': Ist
kein Element von 'System::Windows::Forms::Form::DialogResult'
1> c:\vs2005\projekt1\projekt1\Form1.h(23): Siehe Deklaration
von 'System::Windows::Forms::Form::DialogResult'
1>c:\vs2005\projekt1\projekt1\Form1.h(156) : error C2065: 'OK':
nichtdeklarierter Bezeichner
1>Das Buildprotokoll wurde unter
"file://c:\VS2005\Projekt1\Projekt1\Debug\BuildLog.htm" gespeichert.
1>Projekt1 - 2 Fehler, 0 Warnung(en)
If this works for you - what could I have done wrong?
I am using
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installierte Edition: Professional
Thanks
Richard
Jochen Kalmbach [MVP] schrieb:
Hi rk!
using namespace System::Windows::Forms;
but this did not prevent the problem. I know, that
if (openFileDialog1->ShowDialog()==
System::Windows::Forms::DialogResult::OK)
and
using namespace System::Windows::Forms;
if (openFileDialog1->ShowDialog()==DialogResult::OK)
should be equivalent. So I would expect it to be a bug if they are not.
What prolems do you get???
For me it works without any problems in VS2003 and VS2005...