That doesnt seem to work for me. The window stays in the back. And as you mentioned, the ForceFore() solution also doesnt work. Any other solutions?rsts wrote:Ok - several months back in an semi-major code update, forcefore stopped working the way I needed it to.
Here's the routine I ended up using as a replacement, after quite a bit of trial and error. It may be somewhat unique to my circumstance that this works where forcefore didn't. I'm not trying to fault forcefore at all. It worked fine for me before I made the changes.
cheersCode: Select all
ShowWindow_(WindowID(#window_0),#SW_SHOWNORMAL| #SW_RESTORE) SetWindowPos_(Handle, #HWND_TOPMOST, 0,0,0,0, #SWP_SHOWWINDOW |#SWP_NOMOVE | #SWP_NOSIZE) Sleep_(250) SetWindowPos_(Handle,-2,0,0,0,0,#SWP_NOSIZE|#SWP_NOMOVE)
How to re-activate my app ?
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
I used this to restore windows:
Code: Select all
SendMessage_(Hwnd,#SW_SHOWNORMAL,0,0)
ShowWindow_(Hwnd,#SW_RESTORE)
ShowWindow_(Hwnd,#SW_SHOW)
SetForegroundWindow_(Hwnd)
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Bringing Window to the Front (BRINGTOFRONT)
Thanks Info0Byt3, This is beautifully simply and simply beautiful (works)!
I was looking for SW_BRINGTOFRONT (or something like that) but then I found these 4 lines of code that you provided.

Much appreciated,
Roark
I was looking for SW_BRINGTOFRONT (or something like that) but then I found these 4 lines of code that you provided.

Much appreciated,
Roark