How can I position a form at the bottom right corner of the screen when the form loads? I'm using Visual Basic 2010 Express.
Thanks
EDIT: I did this and it seems to work great.
Dim x As Integer
Dim y As Integer
x = Screen.PrimaryScreen.WorkingArea.Width - 400
y = Screen.PrimaryScreen.WorkingArea.Height - 270
Me.Location = New Point(x, y)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Visible = True
Dim x As Integer
Dim y As Integer
x = Screen.PrimaryScreen.WorkingArea.Width
y = Screen.PrimaryScreen.WorkingArea.Height - Me.Height
Do Until x = Screen.PrimaryScreen.WorkingArea.Width - Me.Width
x = x - 1
Me.Location = New Point(x, y)
Loop
End Sub
You need to change the Form.StartPosition to Manual and change the Location property of the form
eg how to set form startup location/position manually?
or
VB.net - Form Start Position Upper Left
using Form.StartPosition Property and Form.Location Property
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With