@jinzai
Sweet!
@Code Eater
To use the win32 api functions in DBC, you should set your application to windowed mode. Here's a variation of jinzai's code with that taken into account and also modified slightly for DBC. I load the DLL outside of the function just because I prefer to maintain management of the DLL ID numbers, their loading and deleting, and not leave it up to the function.
You could ignore my changes and leave everything as jinzai had it but get rid of
local user32 as integer
local hwnd as dword
local i as integer
and change 0x0043 to 67
set window on
sync on
user32=1
load dll "user32.dll",user32
MakeWindowTopMost(user32)
delete dll user32
do
cls
inc count
print "I'm active, on top, and counting ";count
sync
loop
end
function MakeWindowTopMost(user32)
hwnd = call dll(user32, "GetActiveWindow")
if hwnd <> 0
i = call dll(user32, "SetWindowPos", hwnd, -1, 0, 0, 0, 0, 67)
endif
endfunction
Enjoy your day.