The application is class library,
so I put on code :
[DllImport("user32.dll", EntryPoint = "MessageBoxA")]
static extern int MsgBox(int hWnd,
string msg,
string caption,
int type);
and use MsgBox fine.
Thanks, anyway
"Peter Duniho" wrote in message
Well, that's what I have done.
Still on the class library - MessageBox.Show("x"); isn't compiled.
I got the message:
Error 1 The name 'MessageBox' does not exist in the current context
To use any member of any type, you must:
-- reference the assembly that declares the type, and
-- use the correct name in your code when using the type
If a type exists within a namespace, as most do (including MessageBox), you
must either provide the fully-qualified name (i.e. the full name, including
the namespace) or you must add an appropriate "using" directive to your .cs
file for the namespace in which the type is found).
Given the error message, I suspect you have not added the necessary "using"
directive. You either need to do that, or use the fully-qualified name of
the type (which is "System.Windows.Forms.MessageBox").
Pete