Reputation: 9
I am trying to create a bot using c#, in Visual Studio. What i am struggling to do is that i am trying to create a small box in the corner of the screen while the bot is running, a like the one in the picture:
Also, i would like it to be permanently in the corner of screen, so it cant be a window. What i mean by this is that if i was to click away from the box and away from the screen then the box should still be visible.
Upvotes: 0
Views: 432
Reputation: 1
I simply set the Maximum Size to 1,1. On my screen a 5mm square window showed up.
Upvotes: -1
Reputation: 937
If you want the window to be placed in the lower right corner of the screen, this code will help:
protected override void OnLoad(EventArgs e)
{
this.TopMost = true;
var screen = Screen.FromPoint(this.Location);
this.Location = new Point(screen.WorkingArea.Right - this.Width, screen.WorkingArea.Top);
base.OnLoad(e);
}
Upvotes: 3