Solved

VB.Net How to place a form in bottom right of screen

Posted on 2011-09-10
3
384 Views
Last Modified: 2012-05-12
Hi Experts.  I have a small form that I would like to have appear in roughly the bottom right hand corner of the screen.  As most screens will be different sizes, how do I determine the correct screen position.  Thanks in advance
0
Comment
Question by:PNRT
3 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 36516903
Simple one. In the Load event of the form:
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load

    Me.Location = New Point(Screen.PrimaryScreen.WorkingArea.Width - Me.Width, Screen.PrimaryScreen.WorkingArea.Height - Me.Height)

End Sub

Open in new window

0
 
LVL 22

Expert Comment

by:plusone3055
ID: 36516906
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36516908
You might try something like:

Me.Left = System.Windows.Forms.Screen.WorkingArea.Width - Me.Width
Me.Top = System.Windows.Forms.Screen.WorkingArea.Height - Me.Height

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now