Solved

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

Posted on 2011-09-10
3
407 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 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