Form StartUpPosition

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I've got a small form (400 X 310) and I want it to start up in the lower
right corner of the screen. Is there a way I can easily do this?

Thanks
 
Jason said:
I've got a small form (400 X 310) and I want it to start up in the lower
right corner of the screen. Is there a way I can easily do this?

You could use 'Screen.PrimaryScreen.WorkingArea' to get the height/width of
the screen and then position your form accordingly.
 
I should of probably mentioned, that I'm a VB.net newbie.

could you explain further into detail.
Thanks
 
Jason said:
I should of probably mentioned, that I'm a VB.net newbie.

Try this:

\\\
With Screen.PrimaryScreeen.WorkingArea
Me.Location = New Point(.Width - Me.Width, .Height - Me.Height)
End With
///
 
When I add that code to mine, the Screen.PrimaryScreen becomes underlined,
with the caption that PrimaryScreen is not a member of
'System.Windows.Forms.Screen
What does that mean?
 
I've got it working, thanks for your help.


Herfried K. Wagner said:
Try this:

\\\
With Screen.PrimaryScreeen.WorkingArea
Me.Location = New Point(.Width - Me.Width, .Height - Me.Height)
End With
///
 
Back
Top