当然有,例如:MessageBox.Show("You must enter a name.", "Name Entry Error", MessageBox.IconExclamation | MessageBox.OK);

解决方案 »

  1.   

    #using <mscorlib.dll>
    using namespace System; 
    using namespace System::Runtime::InteropServices;typedef void* HWND;
    [DllImport("user32", CharSet=CharSet.Ansi)]
    extern "C" int MessageBox(HWND hWnd,
                              String*  pText,
                              String*  pCaption,
                              unsigned int uType);
    void main(void) {
         String* pText = L"Hello World!";
         String* pCaption = L"PInvoke Test";
         MessageBox(0, pText, pCaption, 0);
    }
      

  2.   

    MessageBox.Show("HELLO!","World",MessageBox.IconInformation |MessageBox.OKCancel );
      

  3.   

    wbtvc() and hello_wyq's Code from SDK and Only in C++ from VS.Net