# Vision hide window "close" button

**URL:** <https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [July 28, 2022, 5:14am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386 "2022-07-28T05:14:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pofer\_Wang](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@Pofer\_Wang](https://forum.inductiveautomation.com/u/Pofer_Wang)\
**Post date:** [July 28, 2022, 5:14am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/1 "2022-07-28T05:14:46Z")

</div>

Hello everyone, I have a problem.

I want to hide my vision client’s title “close” button and “zoom out” button

Can do it?

I try use Vision Client Launcher,but it without about the function.

 ![2022-07-28 13_08_07-Ignition Vision Client Launcher](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b77c726d1107fa0faafbd7606d3f4d75b73996ae.png)

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 28, 2022, 5:52am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/2 "2022-07-28T05:52:23Z")

</div>

In Vision Client Launcher if you select the project → Manage → Windows Mode you can choose to open the project as full screen.

---

<div class="post-metadata">

**Author:** ![Pofer\_Wang](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@Pofer\_Wang](https://forum.inductiveautomation.com/u/Pofer_Wang)\
**Post date:** [July 28, 2022, 6:41am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/3 "2022-07-28T06:41:42Z")

</div>

I try it,but I still need my window can free drag.  
If choose full screen, I will lost it.

or have other of ways to do it?

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 28, 2022, 7:06am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/4 "2022-07-28T07:06:15Z")

</div>

Ah ok, I’m sorry I can’t help about this

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 28, 2022, 12:24pm UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/5 "2022-07-28T12:24:20Z")

</div>

> [@Pofer\_Wang](#):
>
> but I still need my window can free drag.

Nope, one or the other.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [July 29, 2022, 8:45am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/6 "2022-07-29T08:45:46Z")

</div>

I was playing with this and I can’t understand why `.setResizable` works and `.setDefaultCloseOperation` doesn’t…

 ![Screenshot_51](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/fa1fba71d6345f5515e2bba23981aed1d6243951.png)

```auto
from javax.swing import SwingUtilities

root = SwingUtilities.getRoot(event.source)
root.setResizable(False)	#THIS WORKS
root.setDefaultCloseOperation(root.DO_NOTHING_ON_CLOSE)	#THIS DOESN'T WORK

```

I know that `.setDefaultCloseOperation` will not disable the close (X) button like `.setResizable`, but it should prevent closing the window… or not?

---

<div class="post-metadata">

**Author:** ![Federick732000](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/federick732000/32/23954_2.png) [@Federick732000](https://forum.inductiveautomation.com/u/Federick732000)\
**Post date:** [July 29, 2022, 10:08am UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/7 "2022-07-29T10:08:17Z")

</div>

Hi,

I don’t know about `.setDefaultCloseOperation`, but if you want to intercept the closure of the Application, you can use the **Client Event Script** `Shutdown-Intercept`  
You can use `event.cancel=1` to prevent the application from being closed.  
This is useful if you want to make a popup to appear to confirm the application shutdown.  
This won’t make the (X) button disappear, but maybe this can help you, I hope 🙂

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [July 29, 2022, 3:29pm UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/8 "2022-07-29T15:29:36Z")

</div>

Yes, thank you... 👍  
I know about shutdown-intercept...  
It's not about closing application.... well, not in my case...  
I just wanna know why

> root.setResizable(False)

works and

> root.setDefaultCloseOperation(root.DO\_NOTHING\_ON\_CLOSE)

don't...

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 29, 2022, 4:03pm UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/9 "2022-07-29T16:03:08Z")

</div>

What about just turning off the closeable property on the window in designer -  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/245c9d8ed7bd819786511ca3587e0c25028618d4.png)

yields

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b649596d43546433431f643fab9f95dba7f96404.png)

Edit: Oh I see this is for main windows.

---

<div class="post-metadata">

**Author:** ![Pofer\_Wang](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@Pofer\_Wang](https://forum.inductiveautomation.com/u/Pofer_Wang)\
**Post date:** [July 29, 2022, 5:31pm UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/10 "2022-07-29T17:31:36Z")

</div>

Maybe my case can do this way.  
thank you!!

---

<div class="post-metadata">

**Author:** ![Pofer\_Wang](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@Pofer\_Wang](https://forum.inductiveautomation.com/u/Pofer_Wang)\
**Post date:** [July 29, 2022, 5:36pm UTC](https://forum.inductiveautomation.com/t/vision-hide-window-close-button/62386/11 "2022-07-29T17:36:05Z")

</div>

Maybe I can try it,  
but my boss will kill me. lol
