Is there any way to make "StartPosition" Starts to "Bottom"
Asked
Active
Viewed 845 times
-3

AgentRed
- 62
- 5
- 36
-
Do you mean to [start it minimized](https://stackoverflow.com/q/35608239/107625)? – Uwe Keim Feb 22 '19 at 07:30
-
No i just want it open from bottom not above – AgentRed Feb 22 '19 at 07:31
-
2It is not clear what you'd like to achive. – koviroli Feb 22 '19 at 07:34
-
@koviroli i edited it – AgentRed Feb 22 '19 at 07:43
-
Still not clear (to me). – Uwe Keim Feb 22 '19 at 08:01
-
@UweKeim someone already understood it – AgentRed Feb 22 '19 at 08:11
1 Answers
4
Use location property.
this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
(Screen.PrimaryScreen.WorkingArea.Height - this.Height));
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.Manual;
this.Location = ...;
}

cdev
- 5,043
- 2
- 33
- 32
-
-
-
1As a note, you *should* have something like: `Screen screen = Screen.FromHandle(this.Handle); this.Location = new Point((screen.WorkingArea.Width ...);` in `Form.Load()` or `OnHandleCreated()`. You're supposing that the application main Window is opened in the Primary screen, which may not be the case. – Jimi Feb 22 '19 at 14:15