Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitlePosition a form in the lower right corner accounting for the task bar in VB .NET
DescriptionThis 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.
Keywordsposition form, taskbar, lower right, VB.NET
CategoriesTips 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
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated