Last active
April 23, 2023 09:51
-
-
Save 6rube/34b561827f0805f73742541b8b8bb770 to your computer and use it in GitHub Desktop.
C# .net 6.0 Messagebox for console applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.InteropServices; | |
//Call Win32 API for opening a Messagebox (This does not require any other libarys) | |
[DllImport("user32.dll", CharSet = CharSet.Unicode)] | |
static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type); | |
MessageBox(new IntPtr(0), "Message", "Title", 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment