# BR: Main Window with native title bar does not appear after application is started

**URL:** <https://forum.juce.com/t/br-main-window-with-native-title-bar-does-not-appear-after-application-is-started/48427>\
**Category:** Windows\
**Created:** [October 25, 2021, 12:53pm UTC](https://forum.juce.com/t/br-main-window-with-native-title-bar-does-not-appear-after-application-is-started/48427 "2021-10-25T12:53:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MBO](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mbo/32/5045_2.png) [@MBO](https://forum.juce.com/u/MBO)\
**Post date:** [October 25, 2021, 12:53pm UTC](https://forum.juce.com/t/br-main-window-with-native-title-bar-does-not-appear-after-application-is-started/48427/1 "2021-10-25T12:53:11Z")

</div>

This problem was resurfacing few times on the forum AFAIR. A blank GUI project works as expected. But it is enough to add one button to the MainComponent and then when such app is launched from the explorer, it cannot appear on the screen and it is just blinking on the taskbar. One possible workaround is to `setNativeTitleBar (false)` in the MainWindow constructor and to add at the end `setNativeTitleBar (true)`. The problem is not present with the JUCE title bar.

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [October 25, 2021, 5:24pm UTC](https://forum.juce.com/t/br-main-window-with-native-title-bar-does-not-appear-after-application-is-started/48427/2 "2021-10-25T17:24:58Z")

</div>

Could you try modifying the following function from `juce_win32_Windowing.cpp` and check whether it resolves the problem for you? It seems to work for me for the GuiAppExample project.

```
static void* toFrontCallback1 (void* h)
{
    BringWindowToTop ((HWND) h);
    return nullptr;
}

```

If this also solves the issue for you and doesn’t introduce any regressions then I’ll add this to the `develop` branch.

---

<div class="post-metadata">

**Author:** ![MBO](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mbo/32/5045_2.png) [@MBO](https://forum.juce.com/u/MBO)\
**Post date:** [October 25, 2021, 7:51pm UTC](https://forum.juce.com/t/br-main-window-with-native-title-bar-does-not-appear-after-application-is-started/48427/3 "2021-10-25T19:51:30Z")

</div>

Yes, this works and I don’t see any regressions, at least for now. Thanks!

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [October 28, 2021, 9:21am UTC](https://forum.juce.com/t/br-main-window-with-native-title-bar-does-not-appear-after-application-is-started/48427/4 "2021-10-28T09:21:51Z")

</div>

Thanks, I’ve pushed the fix here:

> <https://github.com/juce-framework/JUCE/commit/cdbefa3b51e2084b51e7ec506984f263708f8537>
