Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
MessageBox (user32)
.
C# Signature (New)
[DllImport("user32.dll",CharSet=CharSet.Auto)]
public static extern int MessageBox(IntPtr hWnd,String text,String caption,
MessageBoxStyles style);
/// MessageBoxStyles Structure
/// By Gabriel T. Sharp [osirisgothra@hotmail.com]
/// Use one or more of the following combined with bitwise-or operator
[Flags()]
public enum MessageBoxStyles:uint
{
ok=0x00000000U,
okCancel=0x00000001U,
abortretryignore=0x00000002U,
yesnocancel=0x00000003U,
yesno=0x00000004U,
retrycancel=0x00000005U,
iconhand=0x00000010U,
iconquestion=0x00000020U,
iconexclamation=0x00000030U,
iconasterisk=0x00000040U,
defbutton1=0x00000000U,
defbutton2=0x00000100U,
defbutton3=0x00000200U,
defbutton4=0x00000300U,
applmodal=0x00000000U,
systemmodal=0x00001000U,
taskmodal=0x00002000U,
help=0x00004000U,
nofocus=0x00008000U,
setforeground=0x00010000U,
default_desktop_only=0x00020000U,
topmost=0x00040000U,
right=0x00080000U,
rtlreading=0x00100000U
}
Imports System.Runtime.InteropServices
<DllImport("user32.dll", CharSet:=CharSet.Auto)> _
Shared Function MessageBox(ByVal hwnd As IntPtr, ByVal t As String, ByVal caption As String, ByVal t2 As UInt32) As Integer
End Function
User-Defined Types:
None.
Notes:
None.
Tips & Tricks:
Input something
Sample Code C#:
using System;
using System.Runtime.InteropServices;
class Class1
{
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int MessageBox(IntPtr hWnd, String text, String caption,
uint type);
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).