force application to be shown on a specific monitor
-
Hi! Is it possible to force an application (WPF) to be shown on a specific monitor? I need this because my three applications are windowstate maximized without border, each one should be shown on another monitor. thx in advance, eza
If you get an answer can you reply on this thread too, I would be interested in this as it is an issue with my company's app. We have a crude solution, but something elegant would be cuwel. Thanks
Panic, Chaos, Destruction. My work here is done.
-
Hi! Is it possible to force an application (WPF) to be shown on a specific monitor? I need this because my three applications are windowstate maximized without border, each one should be shown on another monitor. thx in advance, eza
I don't know about in WPF, but in WinForms you can get an array of all the available screens using the static Screen.AllScreens readonly property. So long as the form's StartPosition is FormStartPosition.Manual then you can use the desired screen's bounds to make sure it goes to the right place. If nothing similar exists in WPF, I believe you can still add a reference to System.Windows.Forms which should allow you to do this.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
Hi! Is it possible to force an application (WPF) to be shown on a specific monitor? I need this because my three applications are windowstate maximized without border, each one should be shown on another monitor. thx in advance, eza
Hi, I have done such things many years ago, and can't test it right now. This is how I remember it: - AFAIK there is no single command to do it; - assuming the desktop extends across all monitors, the virtual desktop has boundaries much larger than the normal 1280*1024 or whatever resolution you use; - open your window in normal mode (not maxed/mined) and keep its size below one screen full; - now move it around by setting its topleft corner, move it to a point that is near the topleft of the monitor you want; - only then maximize it. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
-
Hi! Is it possible to force an application (WPF) to be shown on a specific monitor? I need this because my three applications are windowstate maximized without border, each one should be shown on another monitor. thx in advance, eza
Found only System.Windows.Forms.AllScreens which can be used but is not how I really like it to be done. The reason is I'm using WPF, and just for this using the Windows.Forms is a pain. Has anyone an idea of how much extra RAM I need for using Windows.Forms just for one function? As far as I've ssen there aren't really any alternatives (except using unmanaged code and p/invoke) but this is the least think I really want to do (beyond using e.g NVIDIA APIs). More ideas are welcome! ;) greets, eza