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 > PowerShell

Vista - Position a windows form in (or near) the console area?

Reply
 
Old 02-08-2008   #1 (permalink)
Duncan Smith


 
 

Position a windows form in (or near) the console area?

This may be a long shot, but I'll ask anyway...

I plan to use something like use the Get-OkCancel dialog from
Powershell in Action (which is basically a windows form being shown
with ShowDialog() )

Is there any way to specify the initial localtion of the form on the
screen? Ideally this would be within the PS console area, or at least
near it. At the moment the form can even appear on a different
monitor to the console (which isn't so good from a usability point of
view).

$host returns some info in a ConsoleHost type, but it doesn't seem to
contain any location co-ordinates.

For extra consistency, it also be good if you could assign the 'Esc'
key to a cancel button. Maybe using Start-KeyHandler inside the
windows form or something...

Many thanks,

Duncan

My System SpecsSystem Spec
Old 02-08-2008   #2 (permalink)
Shay Levi


 
 

Re: Position a windows form in (or near) the console area?


This may help:

http://scriptolog.blogspot.com/2008/...ike-popup.html



-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Quote:

> This may be a long shot, but I'll ask anyway...
>
> I plan to use something like use the Get-OkCancel dialog from
> Powershell in Action (which is basically a windows form being shown
> with ShowDialog() )
>
> Is there any way to specify the initial localtion of the form on the
> screen? Ideally this would be within the PS console area, or at least
> near it. At the moment the form can even appear on a different
> monitor to the console (which isn't so good from a usability point of
> view).
>
> $host returns some info in a ConsoleHost type, but it doesn't seem to
> contain any location co-ordinates.
>
> For extra consistency, it also be good if you could assign the 'Esc'
> key to a cancel button. Maybe using Start-KeyHandler inside the
> windows form or something...
>
> Many thanks,
>
> Duncan
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Windows Explorer Size and Position Vista General
Windows Explorer window position Vista General
Return from screensaver changes windows size & position Vista General
Windows sizes and position Vista General
How to keep windows size and position? Vista performance & maintenance


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