Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Store Program Coordinates

Reply
 
Old 11-25-2008   #1 (permalink)
Derek Hart


 
 

Store Program Coordinates

I am storing the top, left, height and width coordinates of a winforms
application when the user exits the application, so it loads the same way
next time. If the user moves the application to the bottom right and sizes
it small, or even has multiple monitors set up and moves the application to
the next monitor, the application may come back and not be found. The user
can right click on the taskbar and choose to size it, which allows it to be
pulled back onto the screen, but that is not intuitive. Is there a clever
way to compare the top and left coordinates that I store in the registry,
and determine if those can be visible on screen? Then I could reset it.



My System SpecsSystem Spec
Old 11-25-2008   #2 (permalink)
Miro


 
 

Re: Store Program Coordinates

Why not just store the windows form size and always show it center screen?
-you will never run into an issue of the form being opened 'off' the screen
and the user looks for it.

You may be opening up a can of worms trying to always open it up in the same
spot like this.

Miro

"Derek Hart" <derekmhart@xxxxxx> wrote in message
news:%23MtQF9rTJHA.4916@xxxxxx
Quote:

>I am storing the top, left, height and width coordinates of a winforms
>application when the user exits the application, so it loads the same way
>next time. If the user moves the application to the bottom right and sizes
>it small, or even has multiple monitors set up and moves the application to
>the next monitor, the application may come back and not be found. The user
>can right click on the taskbar and choose to size it, which allows it to be
>pulled back onto the screen, but that is not intuitive. Is there a clever
>way to compare the top and left coordinates that I store in the registry,
>and determine if those can be visible on screen? Then I could reset it.
>
My System SpecsSystem Spec
Old 11-25-2008   #3 (permalink)
Family Tree Mike


 
 

Re: Store Program Coordinates

"Miro" <miro@xxxxxx> wrote in message
news:%23T0i6awTJHA.4180@xxxxxx
Quote:

> Why not just store the windows form size and always show it center screen?
> -you will never run into an issue of the form being opened 'off' the
> screen and the user looks for it.
>
> You may be opening up a can of worms trying to always open it up in the
> same spot like this.
>
> Miro
>
> "Derek Hart" <derekmhart@xxxxxx> wrote in message
> news:%23MtQF9rTJHA.4916@xxxxxx
Quote:

>>I am storing the top, left, height and width coordinates of a winforms
>>application when the user exits the application, so it loads the same way
>>next time. If the user moves the application to the bottom right and sizes
>>it small, or even has multiple monitors set up and moves the application
>>to the next monitor, the application may come back and not be found. The
>>user can right click on the taskbar and choose to size it, which allows it
>>to be pulled back onto the screen, but that is not intuitive. Is there a
>>clever way to compare the top and left coordinates that I store in the
>>registry, and determine if those can be visible on screen? Then I could
>>reset it.
>>
>
But the title bar, edges and controls may be off the screen if the
resolution has changed. I think that testing the size vesus the screen and
potentially scaling will work well.

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Uninstalled Program, but Program Name Remains in Program & Featur Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46