Description : Normally we are using message boxes in windows. The following code an example of message box It is created from user32.dll
Namespace part
using System; using System.Runtime.InteropServices;
This is the Main class for showing the message box
public class MyWinClass { public static void Main() { string MsgCaption = "My Message Title"; string MsgText = "This message is conformation of your database updation"; WINAPI.ShowMessage(0, MsgText, MsgCaption, 0); } }
Windows API for get the message box
public class WINAPI { [DllImport("user32.dll", EntryPoint = "MessageBox")] public static extern int ShowMessage(int hWnd, string text, string caption, uint type); }
Code Explanation
1. Create the WINAPI class 2. Get the message box 3. Show the WINAPI message box
The above output is very simple, But the main concept is get the message box from user32.dll
By Nathan
|
No responses found. Be the first to respond and make money from revenue sharing program.
|