using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Dot
{
public partial class MainForm : Form
{
private static int CircleSize = 20;
private static Brush CircleColor = Brushes.Green;
private static Point? CirclePosition = new Point(100, 100);
public MainForm() {
InitializeComponent();
this.Width = CircleSize;
this.Height = CircleSize;
this.TopMost = true;
this.AllowTransparency = true;
this.BackColor = Color.Beige;
this.TransparencyKey = BackColor;
if (CirclePosition.HasValue) {
this.StartPosition = FormStartPosition.Manual;
this.Location = CirclePosition.Value;
}
else
this.StartPosition = FormStartPosition.CenterScreen;
}
protected override void OnPaint(PaintEventArgs e) {
base.OnPaint(e);
e.Graphics.SmoothingMode =
System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
e.Graphics.FillEllipse(CircleColor, 0, 0, CircleSize, CircleSize);
}
}
}