# Moving fullscreen projects between multiple monitors

**URL:** <https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 28, 2011, 10:58pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582 "2011-01-28T22:58:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [January 28, 2011, 10:58pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/1 "2011-01-28T22:58:14Z")

</div>

Here is a screen that will show the display configuration and allow you to move the project to a display of your choice. Click on the desired window and it'll prompt you to move the project there.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/b367d569cda0e296366bf22ebc7b67adb0ef6a98.png)  

[screenMove.vwin](https://us1.discourse-cdn.com/inductiveautomation/original/1X/27997e80553550b09e4a330b9b7fc7d9f7ae1cc0.vwin) (14.4 KB)

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [February 1, 2011, 2:56pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/2 "2011-02-01T14:56:14Z")

</div>

Here is an updated window

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/d4ae77eac5dced5c9efec8fd6e0af3acb495e563.png)  
  
[Move Screen.vwin](https://us1.discourse-cdn.com/inductiveautomation/original/1X/d29e7e7cd8f2dd4517d6760b2d2b424037bcba39.vwin) (14.4 KB)

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 3, 2011, 5:13pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/3 "2011-02-03T17:13:03Z")

</div>

Cool!

---

<div class="post-metadata">

**Author:** ![tailfire](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tailfire](https://forum.inductiveautomation.com/u/tailfire)\
**Post date:** [June 12, 2012, 4:09am UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/4 "2012-06-12T04:09:19Z")

</div>

very cool ! how does it work? how to we import the vwin? I have a similar need for this functionality.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 29, 2013, 7:08am UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/5 "2013-08-29T07:08:54Z")

</div>

Amazing !!! ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [January 5, 2014, 10:55pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/6 "2014-01-05T22:55:19Z")

</div>

Thanks Kyle; nice work!

Tailfire: The .vwin file is an Ignition Vision client popup window with some slick scripting in it. You import the .vwin by right clicking the Windows folder in the Designer’s project browser and selecting import:  
[attachment=0]Fullscreen capture 2014.01.05 145114.bmp.jpg[/attachment]  
After import, you’ll see a new “Move To Screen” window in your project tree. To use it:  
1 - Add a button to one of your windows that opens the “Move To Screen” window.  
2 - Pressing that button will then bring up the screen showing your monitors as shown in Kyle’s screenshot above.  
3 - Touching/clicking the box corresponding to the screen your client is NOT currently on will move the client to that screen. (Touch/clicking the screen your client IS currently on closes the Move To Screen popup.)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 9, 2018, 4:04pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/7 "2018-10-09T16:04:11Z")

</div>

Dead links above. Here is an exported window:

[Move To Screen.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6a99e27d374fd6cb5454d3edc3a0e9dd51e4dc56.proj) (16.1 KB)

---

<div class="post-metadata">

**Author:** ![Morgan](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Morgan](https://forum.inductiveautomation.com/u/Morgan)\
**Post date:** [December 5, 2019, 9:11pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/8 "2019-12-05T21:11:14Z")

</div>

This is awesome!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 19, 2019, 4:29am UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/9 "2019-12-19T04:29:37Z")

</div>

8 years later, but very nice! Nice to see how it’s done as well 🙂

---

<div class="post-metadata">

**Author:** ![y.parashchuk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/y.parashchuk/32/37781_2.png) [@y.parashchuk](https://forum.inductiveautomation.com/u/y.parashchuk)\
**Post date:** [December 5, 2023, 5:49pm UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/10 "2023-12-05T17:49:16Z")

</div>

That saved my day. Tanks a lot!

---

<div class="post-metadata">

**Author:** ![abiesbiogas](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@abiesbiogas](https://forum.inductiveautomation.com/u/abiesbiogas)\
**Post date:** [March 22, 2024, 10:35am UTC](https://forum.inductiveautomation.com/t/moving-fullscreen-projects-between-multiple-monitors/2582/11 "2024-03-22T10:35:25Z")

</div>

Hi all, after 13 years this topic is still usefull 😃

I want to share a solution I had to apply to avoid an exception generated by this code, after moving the project:

```auto
from java.awt import MouseInfo, Point
from system.gui import getParentWindow

# return the distance of cursor from window:
# negative if from leftmost / uppper edge
# positive if from rightmost / lower edge 	
def getDistanceFromWindow(window):
	p = MouseInfo.getPointerInfo().getLocation()
	c = window.getLocationOnScreen() # <<< this generate the exception
    # component must be showing on the screen to determine its location
	x = p.x - c.x
	if x > 0:
		x -= window.width
		if x < 0:
			x = 0

	y = p.y - c.y
	if y > 0:
		y -= window.height
		if y < 0:
			y = 0
	return Point(x , y)

```

After reading [this post on Stack Overflow](https://stackoverflow.com/questions/49638914/what-is-the-best-way-to-move-jframe-to-2nd-display-in-windows-10) I chaged the code of the **Paintable Canvas** component for the **mouseClicked** event this way:

```auto
from java.awt import Rectangle, GraphicsDevice, GraphicsEnvironment
from javax.swing import SwingUtilities, JFrame

screens = event.source.parent.screens

screenClickX = event.x/float(event.source.width)*event.source.gWidth
screenClickY = event.y/float(event.source.height)*event.source.gHeight

for i in range(screens.rowCount):
	name = screens.getValueAt(i,'screen')
	x = screens.getValueAt(i,'x')
	y = screens.getValueAt(i,'y')
	width = screens.getValueAt(i,'width')
	height = screens.getValueAt(i,'height')

	if Rectangle(x,y,width,height).contains(screenClickX,screenClickY):
		if event.source.currentWindow == name:
			system.gui.closeParentWindow(event)
# elif system.gui.confirm("Do you want to move this project to "+name+"?"):
		else:

			frame = SwingUtilities.getAncestorOfClass(JFrame, event.source)
			ge = GraphicsEnvironment.getLocalGraphicsEnvironment()
			gd = ge.getScreenDevices()[i]		
			newFrame = JFrame(gd.getDefaultConfiguration())	
			def doLater(canvas=event.source,frame=frame,x=x,y=y,width=width,height=height, newFrame = newFrame, state= JFrame.MAXIMIZED_BOTH):
				frame.setLocationRelativeTo(newFrame)
				newFrame.dispose()
				frame.setExtendedState(state)
				
			system.gui.closeParentWindow(event)
			system.util.invokeLater(doLater)

```

And the problem is solved 😁
