mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 22:21:23 +12:00
MyMessageBox show activate
This commit is contained in:
parent
6ad54ee766
commit
9a4a64e10f
|
@ -53,6 +53,8 @@ public MyMessageBox(string text, string caption, MessageBoxButtons buttons = Mes
|
|||
MinimizeBox = false;
|
||||
MaximizeBox = false;
|
||||
|
||||
Shown += MyMessageBox_Shown;
|
||||
|
||||
Label labelText = new Label();
|
||||
labelText.Margin = new Padding(0);
|
||||
labelText.Font = SystemFonts.MessageBoxFont;
|
||||
|
@ -148,6 +150,11 @@ public MyMessageBox(string text, string caption, MessageBoxButtons buttons = Mes
|
|||
ClientSize = new Size(panel.Width, labelPanel.Height + (LabelVerticalPadding * 2) + panel.Height);
|
||||
}
|
||||
|
||||
private void MyMessageBox_Shown(object sender, System.EventArgs e)
|
||||
{
|
||||
this.ShowActivate();
|
||||
}
|
||||
|
||||
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons = MessageBoxButtons.OK)
|
||||
{
|
||||
using (MyMessageBox messageBox = new MyMessageBox(text, caption, buttons))
|
||||
|
|
Loading…
Reference in a new issue