Created
November 1, 2021 21:16
-
-
Save MiffOttah/8cbb2fa0f3b3f8b1e4435ae8a5be408a to your computer and use it in GitHub Desktop.
This file contains 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
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
// Version 2, December 2004 | |
//Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
// | |
//Everyone is permitted to copy and distribute verbatim or modified | |
//copies of this license document, and changing it is allowed as long | |
//as the name is changed. | |
// | |
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
// TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
// | |
// 0. You just DO WHAT THE FUCK YOU WANT TO. | |
// | |
using System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
namespace Jeb | |
{ | |
public class Jeb : Form | |
{ | |
const int WIDTH = 320; | |
const int HEIGHT = 18; | |
[STAThread] | |
internal static void Main() | |
{ | |
Application.EnableVisualStyles(); | |
Application.SetCompatibleTextRenderingDefault(false); | |
Application.SetHighDpiMode(HighDpiMode.SystemAware); | |
Application.Run(new Jeb()); | |
} | |
public Jeb() | |
{ | |
TopMost = true; | |
FormBorderStyle = FormBorderStyle.None; | |
ControlBox = false; | |
ShowInTaskbar = false; | |
StartPosition = FormStartPosition.Manual; | |
BackColor = TransparencyKey = Color.FromArgb(255, 16, 16, 16); | |
ForeColor = Color.Black; | |
} | |
protected override void OnLoad(EventArgs e) | |
{ | |
var primaryScreenBounds = Screen.PrimaryScreen.Bounds; | |
Bounds = new Rectangle( | |
primaryScreenBounds.X + (primaryScreenBounds.Width - WIDTH) / 2, | |
primaryScreenBounds.Y, | |
WIDTH, | |
HEIGHT | |
); | |
base.OnLoad(e); | |
} | |
protected override void OnPaint(PaintEventArgs e) | |
{ | |
base.OnPaint(e); | |
int circleSize = HEIGHT * 2; | |
e.Graphics.Clear(BackColor); | |
e.Graphics.FillEllipse(Brushes.Black, 0, -HEIGHT, circleSize, circleSize); | |
e.Graphics.FillEllipse(Brushes.Black, WIDTH - circleSize, -HEIGHT, circleSize, circleSize); | |
e.Graphics.FillRectangle(Brushes.Black, HEIGHT, 0, WIDTH - (HEIGHT * 2), HEIGHT); | |
} | |
protected override void OnDoubleClick(EventArgs e) | |
{ | |
base.OnDoubleClick(e); | |
Close(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment