Skip to content

Commit

Permalink
2021-09-27
Browse files Browse the repository at this point in the history
  • Loading branch information
poerin committed Sep 27, 2021
1 parent 55a6393 commit dd1b521
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Stroke/Stroke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ private void InitializeComponent()
ShowInTaskbar = false;
StartPosition = FormStartPosition.Manual;
TransparencyKey = Color.Black;
Visible = false;
ResumeLayout(false);
}

Expand Down Expand Up @@ -90,8 +89,8 @@ private bool MouseHook_MouseAction(MouseHook.MouseActionArgs args)
}

stroking = true;
TopMost = true;
Visible = true;
API.SetWindowPos(Handle, API.IA.TOPMOST, 0, 0, 0, 0, API.SWP.NOSIZE | API.SWP.NOMOVE | API.SWP.NOACTIVATE);
API.ShowWindow(Handle, API.SW.SHOWNOACTIVATE);
lastPoint = args.Location;
drwaingPoints.Add(args.Location);
return true;
Expand All @@ -101,8 +100,8 @@ private bool MouseHook_MouseAction(MouseHook.MouseActionArgs args)
stroking = false;
draw.Clear();
Refresh();
Visible = false;
TopMost = false;
API.ShowWindow(Handle, API.SW.HIDE);
API.SetWindowPos(Handle, API.IA.NOTOPMOST, 0, 0, 0, 0, API.SWP.NOSIZE | API.SWP.NOMOVE | API.SWP.NOACTIVATE);

if (filtering)
{
Expand Down

0 comments on commit dd1b521

Please sign in to comment.