|
|
Title | Position a form in the lower right corner accounting for the task bar in VB .NET |
Description | This example shows how to position a form in the lower right corner accounting for the task bar in Visual Basic .NET. It uses the SystemInformation object's WorkingArea property to get the area that is available for use. It then moves the form so it sits in the corner of the WorkingArea. |
Keywords | position form, taskbar, lower right, VB.NET |
Categories | Tips and Tricks, VB.NET |
|
|
This program uses the SystemInformation object's WorkingArea property to get the area that is available for use. It then moves the form so it sits in the corner of the WorkingArea.
|
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal _
e As System.EventArgs) Handles MyBase.Load
Dim working_area As Rectangle = _
SystemInformation.WorkingArea
Dim x As Integer = _
working_area.Left + _
working_area.Width - _
Me.Width
Dim y As Integer = _
working_area.Top + _
working_area.Height - _
Me.Height
Me.Location = New Point(x, y)
End Sub
|
|
|
|
|
|