After i added an icon to my executable, HWND_TOPMOST does not work anymore.
i didn't touch the code. What is wrong? Is it a bug?
Code: Select all
// COMPILE_OPTS|C:\Users\PC6\Desktop\SplashPositions.exe|R:\Hopstarter-Orb-Real-One.ico|CONSOLE=0|INCLUDES=1| /NOSYSTRAY /HIDE|RUNTIMES=1|BMPS=1
VBSTART
'Kills a process given its process name
Sub killProcess(pgm)
set wmi = getobject("winmgmts:")
sQuery = "select * from win32_process " & "where name='" & pgm & "'"
set processes = wmi.execquery(sQuery)
for each process in processes
process.terminate
next
End Sub
'returns the number of copies of ProcessName that are running
'will return 0 if ProcessName is not running
Function IsProcessRunning(ProcessName)
Set oWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = oWMIService.ExecQuery ("Select Name from Win32_Process where Name='" & ProcessName & "'")
IsProcessRunning = colProcessList.count
End Function
VBEND
VBStart
Sub Kill(Process)
Dim oShell : Set oShell = CreateObject("WScript.Shell")
oShell.Run "taskkill /f /im " & Process, , True
End Sub
VBEND
IfFileExists>C:\Users\PC6\Desktop\forsplash.txt
copyfile>C:\Users\PC6\Desktop\forsplash.txt,C:\Users\PC6\Desktop\forsplash2.txt
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,1,one
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,2,two
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,3,three
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,4,four
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,5,five
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,6,six
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,7,seven
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,8,eight
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,9,nine
DeleteFile>C:\Users\PC6\Desktop\forsplash2.txt
else
let>one=4
let>two=4
let>three=4
let>four=4
let>five=4
let>six=4
let>seven=4
let>eight=4
let>nine=4
endif
Dialog>SplashScreen1
Caption=SplashScreen1
Width=1
Height=20
Top=815
Left=730
Max=0
Min=0
Close=1
Resize=0
Label=%one%,5,0
EndDialog>SplashScreen1
Dialog>SplashScreen2
Caption=SplashScreen2
Width=10
Height=20
Top=745
Left=350
Max=0
Min=0
Close=1
Resize=0
Label=%two%,5,0,true
EndDialog>SplashScreen2
Dialog>SplashScreen3
Caption=SplashScreen3
Width=10
Height=20
Top=550
Left=200
Max=0
Min=0
Close=1
Resize=0
Label=%three%,5,0,true
EndDialog>SplashScreen3
Dialog>SplashScreen4
Caption=SplashScreen4
Width=10
Height=20
Top=370
Left=270
Max=0
Min=0
Close=1
Resize=0
Label=%four%,5,0,true
EndDialog>SplashScreen4
Dialog>SplashScreen5
Caption=SplashScreen5
Width=10
Height=20
Top=270
Left=530
Max=0
Min=0
Close=1
Resize=0
Label=%five%,5,0,true
EndDialog>SplashScreen5
Dialog>SplashScreen6
Caption=SplashScreen6
Width=10
Height=20
Top=270
Left=750
Max=0
Min=0
Close=1
Resize=0
Label=%six%,5,0,true
EndDialog>SplashScreen6
Dialog>SplashScreen7
Caption=SplashScreen7
Width=10
Height=20
Top=358
Left=1005
Max=0
Min=0
Close=1
Resize=0
Label=%seven%,5,0,true
EndDialog>SplashScreen7
Dialog>SplashScreen8
Caption=SplashScreen8
Width=10
Height=20
Top=550
Left=1080
Max=0
Min=0
Close=1
Resize=0
Label=%eight%,5,0,true
EndDialog>SplashScreen8
Dialog>SplashScreen9
Caption=SplashScreen9
Width=10
Height=20
Top=745
Left=925
Max=0
Min=0
Close=1
Resize=0
Label=%nine%,5,0,true
EndDialog>SplashScreen9
SetDialogObjectFont>SplashScreen1,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen2,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen3,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen4,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen5,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen6,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen7,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen8,msLabel1,Tahoma,28,1,255
SetDialogObjectFont>SplashScreen9,msLabel1,Tahoma,28,1,255
//Borderless Dialog
LibFunc>user32,SetWindowLongA,sres,SplashScreen1.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen2.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen3.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen4.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen5.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen6.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen7.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen8.handle,-16,1073741824
LibFunc>user32,SetWindowLongA,sres,SplashScreen9.handle,-16,1073741824
//Make Dialog Transparent
Let>ByteOpacity=0
Let>GWL_EXSTYLE=-20
Let>WS_EX_LAYERED=524288
Let>LWA_ALPHA=2
//Get Style Attributes of Dialog Window
LibFunc>user32,GetWindowLongA,attribs,SplashScreen1.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen2.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen3.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen4.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen5.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen6.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen7.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen8.handle,GWL_EXSTYLE
LibFunc>user32,GetWindowLongA,attribs,SplashScreen9.handle,GWL_EXSTYLE
Let>attribs={%attribs% OR %WS_EX_LAYERED%}
LibFunc>user32,SetWindowLongA,swl,SplashScreen.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen1.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen1
LibFunc>user32,SetWindowLongA,swl,SplashScreen2.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen2.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen2
LibFunc>user32,SetWindowLongA,swl,SplashScreen3.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen3.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen3
LibFunc>user32,SetWindowLongA,swl,SplashScreen4.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen4.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen4
LibFunc>user32,SetWindowLongA,swl,SplashScreen5.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen5.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen5
LibFunc>user32,SetWindowLongA,swl,SplashScreen6.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen6.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen6
LibFunc>user32,SetWindowLongA,swl,SplashScreen7.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen7.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen7
LibFunc>user32,SetWindowLongA,swl,SplashScreen8.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen8.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen8
LibFunc>user32,SetWindowLongA,swl,SplashScreen9.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen9.handle,0,ByteOpacity,LWA_ALPHA
show>SplashScreen9
ResizeWindow>SplashScreen1,50,50
ResizeWindow>SplashScreen2,50,50
ResizeWindow>SplashScreen3,50,50
ResizeWindow>SplashScreen4,50,50
ResizeWindow>SplashScreen5,50,50
ResizeWindow>SplashScreen6,50,50
ResizeWindow>SplashScreen7,50,50
ResizeWindow>SplashScreen8,50,50
ResizeWindow>SplashScreen9,50,50
Let>ByteOpacity=0
let>KK=0
add>KK,2
//Time to display Splash screen
if>KK>1000000,splash done
//Increase Dialog Opacity
add>ByteOpacity,254
if>ByteOpacity>254
Let>ByteOpacity=255
endif
//Change Dialog Opacity
LibFunc>user32,SetWindowLongA,swl,SplashScreen1.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen1.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen2.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen2.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen3.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen3.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen4.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen4.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen5.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen5.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen6.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen6.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen7.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen7.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen8.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen8.handle,0,ByteOpacity,LWA_ALPHA
LibFunc>user32,SetWindowLongA,swl,SplashScreen9.handle,GWL_EXSTYLE,attribs
LibFunc>user32,SetLayeredWindowAttributes,res,SplashScreen9.handle,0,ByteOpacity,LWA_ALPHA
Let>HWND_TOPMOST=-1
Let>HWND_NOTOPMOST=-2
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>SWP_NOACTIVATE=16
Let>SWP_SHOWWINDOW=64
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen9
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen8
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen7
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen6
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen5
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen4
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen3
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen2
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen1
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
label>splash loop
IfWindowOpen>Splash Feed.exe
CloseWindow>Splash Feed.exe
endif
wait>0.3
IfFileExists>C:\Users\PC6\Desktop\forsplash.txt
copyfile>C:\Users\PC6\Desktop\forsplash.txt,C:\Users\PC6\Desktop\forsplash2.txt
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,1,one
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,2,two
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,3,three
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,4,four
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,5,five
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,6,six
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,7,seven
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,8,eight
ReadLn>C:\Users\PC6\Desktop\forsplash2.txt,9,nine
DeleteFile>C:\Users\PC6\Desktop\forsplash2.txt
GetDialogAction>SplashScreen1,r1
GetDialogAction>SplashScreen2,r2
GetDialogAction>SplashScreen3,r3
GetDialogAction>SplashScreen4,r4
GetDialogAction>SplashScreen5,r5
GetDialogAction>SplashScreen6,r6
GetDialogAction>SplashScreen7,r7
GetDialogAction>SplashScreen8,r8
GetDialogAction>SplashScreen9,r9
Let>SplashScreen1.msLabel1=%one%
Let>SplashScreen2.msLabel1=%two%
Let>SplashScreen3.msLabel1=%three%
Let>SplashScreen4.msLabel1=%four%
Let>SplashScreen5.msLabel1=%five%
Let>SplashScreen6.msLabel1=%six%
Let>SplashScreen7.msLabel1=%seven%
Let>SplashScreen8.msLabel1=%eight%
Let>SplashScreen9.msLabel1=%nine%
ResetDialogAction>SplashScreen1
ResetDialogAction>SplashScreen2
ResetDialogAction>SplashScreen3
ResetDialogAction>SplashScreen4
ResetDialogAction>SplashScreen5
ResetDialogAction>SplashScreen6
ResetDialogAction>SplashScreen7
ResetDialogAction>SplashScreen8
ResetDialogAction>SplashScreen9
Let>HWND_TOPMOST=-1
Let>HWND_NOTOPMOST=-2
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>SWP_NOACTIVATE=16
Let>SWP_SHOWWINDOW=64
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen9
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen8
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen7
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen6
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen5
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen4
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen3
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen2
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
LibFunc>user32,FindWindowA,dhwnd,TForm,SplashScreen1
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,dhwnd,HWND_TOPMOST,0,0,0,0,Flags
endif
goto>splash loop
label>splash done
cdg>SplashScreen