# OSX:  SystemTrayIconComponent::showDropdownMenu() - need means to bring windows to foreground when app is hidden

**URL:** <https://forum.juce.com/t/osx-systemtrayiconcomponent-showdropdownmenu-need-means-to-bring-windows-to-foreground-when-app-is-hidden/16881>\
**Category:** General JUCE discussion\
**Created:** [March 8, 2016, 8:48pm UTC](https://forum.juce.com/t/osx-systemtrayiconcomponent-showdropdownmenu-need-means-to-bring-windows-to-foreground-when-app-is-hidden/16881 "2016-03-08T20:48:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nonchai](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nonchai/32/1507_2.png) [@nonchai](https://forum.juce.com/u/nonchai)\
**Post date:** [March 8, 2016, 8:48pm UTC](https://forum.juce.com/t/osx-systemtrayiconcomponent-showdropdownmenu-need-means-to-bring-windows-to-foreground-when-app-is-hidden/16881/1 "2016-03-08T20:48:38Z")

</div>

On OSX &nbsp;I am using&nbsp;Process::setDockIconVisible(false) to make my app invisible in the dock and use the recently added SystemTrayIconComponent::showDropdownMenu() call to implement my OSX menu bar app&nbsp;with&nbsp;native OSX&nbsp;cocoa menus.

I want my app invisible in the dock and to the app switcher,&nbsp;like other osx menu bar apps like&nbsp;dropbox, WiFi, Airserver, SwitchResX, Splashtop Streamer etc. &nbsp;I want to do everyhting from the menu extras dop down menu.

However when one of my menu items gets selected which is designed to display a modal or non-modal window&nbsp;I cannot seem to find a way to make my window or dialog come to the foreground of another app is in the foreground.

How can I make a window or dialog come to the front ?

&nbsp;I've tried&nbsp;Process::makeForegroundProcess(); &nbsp;but this doesnt work.&nbsp;

&nbsp; I use many OSX menu bar apps ( Cocoatech PathFinder, dropbox, Airserver, SwitchResX, Splashtop Streamer ) which do seem to manage to do this.&nbsp;

I've tried some code suggested in the forum here like:&nbsp;

File app = File::getSpecialLocation(File::currentApplicationFile);

system(String::formatted(T("open %ls"), (const tchar\*)app.getFullPathName()));

&nbsp;

This is on El Capitan on an iMac . JUCE 4.1
