你可以调用WIN32的函数,具体可以查找C#的帮助:〉

解决方案 »

  1.   

    这是一个小例子:using System;
    using System.Runtime.InteropServices;class PlatformInvokeTest
    {
        [DllImport("user32.dll")]
        public static extern int MessageBoxA(
            int h, string m, string c, int type);
        public static int Main() 
        {
            return MessageBoxA(0, "Hello World!", "My Message Box", 0);
        }
    }
      

  2.   

    Optimus():
      谢谢,我可能在问题中说得不明白,我在用webform写的,不是winform。
    可不可以写一个aspx文档中用的例子呢?
      

  3.   

    这个问题不是解决了么?
    怎么又出来了?可以导入winform的动态库,然后使用Winform中的Messagebox.