# Window Visibility Rules

**URL:** <https://forum.xojo.com/t/window-visibility-rules/31046>\
**Category:** General\
**Created:** [April 22, 2016, 10:38pm UTC](https://forum.xojo.com/t/window-visibility-rules/31046 "2016-04-22T22:38:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Dowad](https://forum.xojo.com/letter_avatar_proxy/v4/letter/t/9de0a6/32.png) [@Tom\_Dowad](https://forum.xojo.com/u/Tom_Dowad)\
**Post date:** [April 22, 2016, 10:38pm UTC](https://forum.xojo.com/t/window-visibility-rules/31046/1 "2016-04-22T22:38:57Z")

</div>

I’m trying to keep some functionality of my program in a window. I will rarely want to look at the window, but there may be cases when I do ie for debugging. Most of the time, it is just a container for various controls, code, and what not. This particular window has an IPCsocket, pop3socket, smtpSecureSocket, etc.

The problem I am having is keeping the darned thing from displaying. I have done a little experimentation, looked through the window docs, searched this forum, but haven’t yet found the pearl of wisdom that I seek. That is, under what conditions is a hidden window shown wihtout explicitly called Show or Visible=True.

Can someone tell me where to find this info?  
Is it on any event? Or a call to invalidate? Changing the contents of a control (eg label)?  
I can reverse engineer but…  
TIA

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [April 22, 2016, 10:56pm UTC](https://forum.xojo.com/t/window-visibility-rules/31046/2 "2016-04-22T22:56:19Z")

</div>

I bet you have the window set as implicit instance. Then any call to any property on the window will show it.

If you don’t want to see it, use `Window.Visible = False` to hide it and use Window.Show to see it again. In hidden state, it remains functional, so you will be able to use all your controls and stuff.

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [April 22, 2016, 11:29pm UTC](https://forum.xojo.com/t/window-visibility-rules/31046/3 "2016-04-22T23:29:03Z")

</div>

In my experience, if you have Visible unchecked in the IDE, the window won’t show unless you explicitly show it.

---

<div class="post-metadata">

**Author:** ![Tom\_Dowad](https://forum.xojo.com/letter_avatar_proxy/v4/letter/t/9de0a6/32.png) [@Tom\_Dowad](https://forum.xojo.com/u/Tom_Dowad)\
**Post date:** [April 23, 2016, 12:26am UTC](https://forum.xojo.com/t/window-visibility-rules/31046/5 "2016-04-23T00:26:21Z")

</div>

OK I’ve tested both methods, and it seems Tim’s got the right idea. Setting the visible property to False in the window design mode solved the problem. I expected the implicit instance idea was going to work, but despite no calls that explicitly would make the window visible (but some that set properties and such), the window was shown with implicitinstance = False and visible = True in window design mode.

BTW it may be worth noting that even though the first thing I did with the window was MyWnd.visible = False, that did not prevent the window from showing itself. It only worked when set to False on the inspector.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:17pm UTC](https://forum.xojo.com/t/window-visibility-rules/31046/6 "2020-10-29T18:17:14Z")

</div>


