By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,543 Members | 2,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,543 IT Pros & Developers. It's quick & easy.

How to show a MessageBox outside the form.h module?

P: n/a

I know how the show a MessageBox in Form.h module by using VC.NET.
But I don't know how to show the MessageBox at another class such as
task.cpp which called by the Form.h; my question is how to pass the
arguments from Form.h to a MessageBox::Show() which included in a class

Tsung-Yu Liu
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
if I get it correct, you need to add namespace:

System::Windows::Forms at the beginning of MessageBox::Show().


should work well.

You can also use one of the following forms to call a function, use a
class, or use anything else in a namespace:

using namespace System::Windows::Forms; // allows your code to access
whole System::Windows::Forms namespace
using System::Windows::Forms::MessageBox; // allows your code to access
only System::Windows::Forms::MessageBox

If you, however, use latter one, you may not specify parameters for
Show method of the messagebox because parameters are also in


Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.