How to re-activate my app ?

Just starting out? Need help? Post your questions and find answers here.
Baslo
New User
New User
Posts: 9
Joined: Tue Oct 30, 2007 1:11 pm
Location: Beth Aramaye

Post by Baslo »

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.

Code: 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)
cheers
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?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

BERESHEIT
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

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)
rdority
User
User
Posts: 34
Joined: Mon Mar 30, 2009 10:46 pm
Location: Vancouver, BC

Bringing Window to the Front (BRINGTOFRONT)

Post by rdority »

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.

:P

Much appreciated,
Roark
Post Reply