| But it seems to assume that there is at most one secondary monitor,
| what if you have more than that?
Yes my code is written to find the first secondary monitor.
| form2.Bounds = Screen.FromControl(form1).Bounds
Doh! I miss read the original question. Screen.FromControl would be better
to find the screen where a form is currently displayed.
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ez**************@TK2MSFTNGP15.phx.gbl...
| Jay,
|
| >NOTE: I look for the non primary screen, rather then assume AllScreens[1]
is
| >the second screen... The above code works if there is no secondary
monitor
| >(it just uses the primary).
|
| But it seems to assume that there is at most one secondary monitor,
| what if you have more than that? If you have one form and want another
| to appear on the same screen wouldn't it be better to do something
| like
|
| form2.Bounds = Screen.FromControl(form1).Bounds
|
|
| Mattias
|
| --
| Mattias Sjögren [C# MVP] mattias @ mvps.org
|
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
| Please reply only to the newsgroup.