MessageBox from user32.dll : Windows API : Windows C# Source Code


Custom Search

C# Source Code » Windows » Windows API »

 

MessageBox from user32.dll








    
 

using System;
using System.Runtime.InteropServices;

public class Starter {
    public static void Main() {
        string caption = "Visual C# 2005";
        string text = "Hello, world!";
        API.ShowMessage(0, text, caption, 0);
    }
}

public class API {
    [DllImport("user32.dll", EntryPoint = "MessageBox")]
    public static extern int ShowMessage(int hWnd,
        string text, string caption, uint type);
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Windows
» Windows API