Archive: Program doesn't open on top


Program doesn't open on top
Is there any secret to ensuring that the installed program, when launched from the installer, will open on top? I frequently have to find the program's icon in the taskbar. Probably 50% of the time my newly installed program appears as the top window, which I wish I could increase to 100%.


You can use the MUI_FINISHPAGE_RUN_FUNCTION to launch your program and send it massage to appear on the top.


Thank you very much, Red Wine. I know how I tell (or try to tell) my newly installed app to open on top in windows/C++, but in NSIS, where would I find the message that you mention?


Occasionally I use to use the forum's search feature ;)

http://forums.winamp.com/showthread.php?threadid=268418


Thanks again. I already call SetForegroundWindow in my app, so maybe I will try doing something with the installer, such as HideWindow. But then again, maybe SetForegroundWindow called from the installer will be worth trying.


You look somehow confused SteveRussell.
I guess it is a straight forward process, if you want to be 100% sure that your application is running in foreground when it is launched from the installer, you should tell the installer to set it as foreground. There is nothing you cannot do with nsis.


Red Wine, The thread you referred me to has apparently brought me 100% success. From .onInstSuccess, FindWindow seems to go into an endless loop while searching for my window class, and I think it is due to the fact that this particular app quickly opens a modal dialog. Neither class seems to satisfy FindWindow. However, when I use the window title, all is well.

I thank you once again for your invaluable help! And I would be interested in your thoughts on my interpretation of the endless loop.


Regarding the loop, the class fails for an installed app that doesn't open a modal dialog. So obviously I have something to learn about using the class parameter, even though I borrowed it from Spy++.