Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Place WinForm On Bottom-Right

Tags:

c#

.net

winforms

People also ask

How do I hide winform?

If you Don't want the user to be able to see the app at all set this: this. ShowInTaskbar = false; Then they won't be able to see the form in the task bar and it will be invisible.


try something on the lines of

Rectangle workingArea = Screen.GetWorkingArea(this);
this.Location = new Point(workingArea.Right - Size.Width, 
                          workingArea.Bottom - Size.Height);

Hope it works well for you.


Form2 a = new Form2();
a.StartPosition = FormStartPosition.Manual;
a.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - a.Width, 
                       Screen.PrimaryScreen.WorkingArea.Height - a.Height);

This worked for me; i just put this code listed below after my InitializeComponent();

public FormProgress()
{
    this.StartPosition = FormStartPosition.Manual;
    this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height);
}

It's easy to try;

//Get screen resolution
Rectangle res = Screen.PrimaryScreen.Bounds; 

// Calculate location (etc. 1366 Width - form size...)
this.Location = new Point(res.Width - Size.Width, res.Height - Size.Height);