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 dd1b521 commit 8ebc3d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Stroke/Stroke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private void InitializeComponent()
AutoScaleDimensions = new SizeF(96F, 96F);
AutoScaleMode = AutoScaleMode.Dpi;
BackColor = Color.Black;
Bounds = SystemInformation.VirtualScreen;
Bounds = new Rectangle(SystemInformation.VirtualScreen.X, SystemInformation.VirtualScreen.Y + 1, SystemInformation.VirtualScreen.Width, SystemInformation.VirtualScreen.Height);
ControlBox = false;
FormBorderStyle = FormBorderStyle.None;
MaximizeBox = false;
Expand All @@ -49,8 +49,8 @@ private void InitializeComponent()

public Stroke()
{
API.SetWindowLong(Handle, API.GWL.EXSTYLE, API.GetWindowLong(Handle, API.GWL.EXSTYLE) | (int)(API.WS_EX.TRANSPARENT | API.WS_EX.LAYERED | API.WS_EX.NOACTIVATE));
InitializeComponent();
API.SetWindowLong(this.Handle, API.GWL.EXSTYLE, API.GetWindowLong(this.Handle, API.GWL.EXSTYLE) | (int)(API.WS_EX.TRANSPARENT | API.WS_EX.LAYERED | API.WS_EX.NOACTIVATE));

draw = new Draw(Handle, API.CreatePen(API.PS.SOLID, Settings.Pen.Thickness, new API.COLORREF(Settings.Pen.Color.R, Settings.Pen.Color.G, Settings.Pen.Color.B)));
MouseHook.MouseAction += MouseHook_MouseAction;
Expand Down

0 comments on commit 8ebc3d7

Please sign in to comment.