using System;
using System.Runtime.InteropServices;

class Example
{
    
// Use DllImport to import the Win32 MessageBox function.
    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    
public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type);

    
static void Main()
    {
        
// Call the MessageBox function using platform invoke.
        MessageBox(new IntPtr(0), "Hello World!""Hello Dialog"0);
    }
}

相关文章:

  • 2021-11-10
  • 2021-04-06
  • 2022-03-02
  • 2021-06-03
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2022-01-03
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案