Home All Groups Group Topic Archive Search About
Author
22 Feb 2006 9:21 PM
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

Author
22 Feb 2006 9:33 PM
Herfried K. Wagner [MVP]
"Jason" <ja***@someone.com> schrieb:
> 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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
22 Feb 2006 10:03 PM
Jason
I should of probably mentioned, that I'm a VB.net newbie.

could you explain further into detail.
Thanks

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%23nPdke$NGHA.3908@TK2MSFTNGP10.phx.gbl...
> "Jason" <ja***@someone.com> schrieb:
>> 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.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
22 Feb 2006 10:12 PM
Herfried K. Wagner [MVP]
"Jason" <ja***@someone.com> schrieb:
>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
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
23 Feb 2006 1:25 PM
Jason
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?


Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:upDWf0$NGHA.2300@TK2MSFTNGP15.phx.gbl...
> "Jason" <ja***@someone.com> schrieb:
>>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
> ///
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
23 Feb 2006 1:29 PM
Jason
I've got it working, thanks for your help.


Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:upDWf0$NGHA.2300@TK2MSFTNGP15.phx.gbl...
> "Jason" <ja***@someone.com> schrieb:
>>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
> ///
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>