# Start sketch with hidden window

**URL:** https://discourse.processing.org/t/start-sketch-with-hidden-window/1263
**Category:** Coding Questions
**Created:** [June 25, 2018, 11:38pm UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263 "2018-06-25T23:38:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![cuI6QV0SphbBeN9E](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@cuI6QV0SphbBeN9E](https://discourse.processing.org/u/cuI6QV0SphbBeN9E)
#### Post date: [June 25, 2018, 11:38pm UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263/1 "2018-06-25T23:38:36Z")

</div>

```auto
void setup() {
  surface.setVisible(false);
}

```

If we run the above code, the window itself gets hidden but with a sudden flicker — we can see it get created and then hidden. **Is it possible to start with a truly hidden window (no flicker) and show it later on?**

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [June 26, 2018, 2:33am UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263/2 "2018-06-26T02:33:29Z")

</div>

Things you could try:

Set the window position to something off the screen as determined by screen Width and screenHeight.

Do the above, but in settings().

---

<div class="post-metadata">

### Author: ![KAZ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kaz/32/2402_2.png) [@KAZ](https://discourse.processing.org/u/KAZ)
#### Post date: [June 26, 2018, 3:03am UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263/3 "2018-06-26T03:03:55Z")

</div>

Hope this would help…

```auto
void setup() {
  surface.setLocation(-200,-200);
  surface.setVisible(false);
}

```

---

<div class="post-metadata">

### Author: ![KAZ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kaz/32/2402_2.png) [@KAZ](https://discourse.processing.org/u/KAZ)
#### Post date: [June 26, 2018, 3:13am UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263/4 "2018-06-26T03:13:53Z")

</div>

Gobbledygook:

```auto
float i=0;

void setup() {
  surface.setLocation(-200,-200);
 
}

void draw(){
  surface.setLocation((int)(i=(i+0.1)%450),(int)(i=(i+0.2)%450));
}

```

---

<div class="post-metadata">

### Author: ![cuI6QV0SphbBeN9E](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@cuI6QV0SphbBeN9E](https://discourse.processing.org/u/cuI6QV0SphbBeN9E)
#### Post date: [June 27, 2018, 11:42pm UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263/5 "2018-06-27T23:42:41Z")

</div>

None of the above methods work. At least not on macOS. I had already tried it.

The window does indeed appear relocated, but never beyond a certain point. It’s never created completely outside the visible bounds of the screen.

---

<div class="post-metadata">

### Author: ![KAZ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kaz/32/2402_2.png) [@KAZ](https://discourse.processing.org/u/KAZ)
#### Post date: [June 28, 2018, 2:52am UTC](https://discourse.processing.org/t/start-sketch-with-hidden-window/1263/6 "2018-06-28T02:52:24Z")

</div>

Well It worked for me in Windows, I don’t have a Mac, Sorry!
