# Desktop Resize and Location

**URL:** <https://forum.inductiveautomation.com/t/desktop-resize-and-location/50494>\
**Category:** Ignition\
**Tags:** scripting, vision, ignition81\
**Created:** [August 31, 2021, 7:21pm UTC](https://forum.inductiveautomation.com/t/desktop-resize-and-location/50494 "2021-08-31T19:21:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddonco](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@ddonco](https://forum.inductiveautomation.com/u/ddonco)\
**Post date:** [August 31, 2021, 7:21pm UTC](https://forum.inductiveautomation.com/t/desktop-resize-and-location/50494/1 "2021-08-31T19:21:07Z")

</div>

I’m trying to solve a pretty unique client request where we’d like to use the `system.gui.openDesktop()` function to launch one or more “popup desktops” from the main desktop, such that they can be moved across multiple displays as needed (see example below). Some of these popup desktops offer tabs in the window to swap between different windows, but these windows have different sizes. In an ideal world, the desktop will always match the size of the window, which leads to my questions:

1. Is there a function that will resize a desktop? I’ve looked through the [WindowsUtilitiesForDesktops](http://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/factorypmi/application/script/builtin/WindowUtilitiesForDesktop.html) documentation and don’t see anything, but just wanted to double check.

2. Is there a function to get the location of a desktop? With the location, I could close the current desktop and open a new one in the same location with the correct size for the window selected in the tab strip.

What I’m trying to do is easily accomplished using just popup windows, but at the moment the client is very attached to the idea of freely moving the “popup desktops” around on their displays.

Thanks in advance for any help or suggestions!

 ![ignition popup desktop](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0dc5b67d79cc276a6483ddd37381ddd3738d7876.png)

---

<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:** [August 31, 2021, 9:18pm UTC](https://forum.inductiveautomation.com/t/desktop-resize-and-location/50494/2 "2021-08-31T21:18:06Z")

</div>

This should give you a start:

> [@Max Window size in different monitors](https://forum.inductiveautomation.com/t/max-window-size-in-different-monitors/32030/3):
>
> Do you mean full screen mode where the window fills the whole screen with no title bar? If so, the code below on a button will swap the desktop the button is contained in between full screen and windowed modes. from javax.swing import JFrame window = system.gui.getParentWindow(event) while not isinstance(window, JFrame): window = window.getParent() if window.isUndecorated(): # Switch to windowed mode. window.dispose() window.setUndecorated(False) window.setExtendedState(JFrame.NORMAL) #…
