Click to See Complete Forum and Search --> : Problem Displaying a MessageBox in VC++.NET


bhushan1980
August 11th, 2007, 04:47 AM
I created a Visual C++/CLI windows forms project using VS 2005 team edition and it is giving me some 8-10 errors all related to MessageBox saying that MessageBox is not the member of the name space! I tried including -


using namespace System::Windows::Forms::MessageBox;


as well as I tried using

System::Windows::Forms::MessageBox::Show(L"My sentences");

to give complete navigation of namespaces where ever I had to use a MessageBox call.

But none of them were useful. Am I missing something to be declared? or reference? Or do I have to change some directory or code?

Thank you,
Bhushan.

Marc G
August 11th, 2007, 08:38 AM
[ moved thread ]

Marc G
August 11th, 2007, 08:39 AM
Please post the exact error you are gettings.

bhushan1980
August 11th, 2007, 01:37 PM
First of all sorry for posting in wrong forum.

Here are the errors I am getting....


Error 1 error C2653: 'MessageBox' : is not a class or namespace name c:\Documents and Settings\BhushanInamdar\My Documents\Visual Studio 2005\Projects\SolasPropertyRental1\SolasPropertyRental1\PropertyListing.cpp 35

Error 2 error C3861: 'Show': identifier not found c:\Documents and Settings\BhushanInamdar\My Documents\Visual Studio 2005\Projects\SolasPropertyRental1\SolasPropertyRental1\PropertyListing.cpp 35


I am getting these two errors for every message box in the class. I am using four of them and hence getting eight errors.

Is there some namespace I am missing?

Thank you,
Bhushan.