DllImport : DllImport : Windows C# Examples


C# Examples » Windows » DllImport »

 

DllImport









    
using  System;
using  System.Runtime.InteropServices;

class  MainClass
{
    [DllImport("user32.dll",  CharSet  =  CharSet.Auto)]
    public  static  extern  int  MessageBox(int  hWnd,  String  text,  String  caption,  uint  type);

    [STAThread]
    static  void  Main(string[]  args)
    {
        MessageBox(0,  "Hello  World",  "MyBox",  1);
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Windows
» DllImport