using System.Runtime.InteropServices;

public class testClass
{

 [DllImport("User32.dll", EntryPoint = "MessageBox", CharSet = CharSet.Auto)]
    public static extern int MsgBox(int hWnd, String text, String caption, uint type);
.......
}


int itest = testClass.MsgBox(0, "你确定?", "对话框", 6);

相关文章: