Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   NSIS messages load behind other windows (http://forums.winamp.com/showthread.php?t=254325)

dmr@dv 28th August 2006 14:33

NSIS messages load behind other windows
 
Whenever I run the installer I've created with my NSIS script, the initial window that come up always loads behind my current open window.

I've found reference to the problem here: http://forums.winamp.com/showthread....=&pagenumber=1 near the bottom of the page from Takhir in the iNetLoad plugin thread. I AM in fact using iNetLoad in silent mode, so I assume that is what is causing it. Apparently it was introduced in NSIS version 2.03 and we're now on version 2.19 :(

Has anyone found a workaround for this, or has it not been addressed at all?

Takhir 28th August 2006 15:05

1 Attachment(s)
InetLoad itself not manages NSIS dialogs appearance. If you want move dialog to foreground when download finishes, good way is to use SetForegroundWindow (use forum search for samples). But InetLoad had this option long ago, and code still presents (as commnet) :) So attached build with 'setforeground' enabled may help as well.

dmr@dv 28th August 2006 16:09

How do I use this different version? It seems to be putting extra things on the stack or someting and messing up other checks I'm doing.

I've also tried creating this function and using it for .onGUInit

Function guiInit
FindWindow $0 "" "myApp Setup"
System::Call "user32::SetForegroundWindow(i 0) i.."
FunctionEnd

But it seems to have no effect. I can't find any documentation on how to actually use SetForegroundWindow neither here nor in the wiki.

Takhir 29th August 2006 06:10

code:
Section "Dummy Section" SecDummy
DetailPrint "Waiting 3 sec - set another window foreground"
Sleep 3000
StrCpy $0 $HWNDPARENT
System::Call 'user32::SetForegroundWindow(i r0)'
DetailPrint "Waiting 2 sec - is Installer FG?"
Sleep 2000
DetailPrint Finished
SectionEnd

this worked in my test.
ShowWindow $HWNDPARENT ${SW_RESTORE}
Also helps sometimes in guiInit


All times are GMT. The time now is 04:17.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.