Created
September 19, 2016 20:49
-
-
Save markheath/3ab64f1b3fb89bab71eba2f99f022141 to your computer and use it in GitHub Desktop.
WinForms show a modeless message dialog
This file contains hidden or 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
var f = new Form(); | |
var b = new Button(); | |
b.Text = "Show message"; | |
b.AutoSize = true; | |
f.Controls.Add(b); | |
b.Click += (s, e) => | |
{ | |
var p = new Form(); | |
p.Text = "Hello"; | |
p.Show(f); | |
}; | |
f.ShowDialog(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment