mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-28 11:10:23 +12:00
Auto hide form
This commit is contained in:
parent
0117c5ab11
commit
de1d18d3c8
|
@ -28,6 +28,7 @@
|
|||
using ShareX.ScreenCaptureLib;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ShareX
|
||||
|
@ -45,6 +46,9 @@ public PinToScreenStartupForm()
|
|||
|
||||
private void btnFromScreen_Click(object sender, EventArgs e)
|
||||
{
|
||||
Hide();
|
||||
Thread.Sleep(250);
|
||||
|
||||
if (RegionCaptureTasks.GetRectangleRegion(out Rectangle rect))
|
||||
{
|
||||
Image = new Screenshot().CaptureRectangle(rect);
|
||||
|
@ -55,8 +59,11 @@ private void btnFromScreen_Click(object sender, EventArgs e)
|
|||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Show();
|
||||
}
|
||||
|
||||
private void btnFromClipboard_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in a new issue