View Single Post
Old 28th March 2016, 20:26   #3
Senior Member
r2du-soft's Avatar
Join Date: Nov 2013
Location: Iran
Posts: 343
Originally Posted by Anders View Post
No it is not really possible. All newer versions of Windows have something called the foreground lock so only the active application is allowed to change the focus. This restriction exists to prevent other applications from changing the focus just like you are trying to do because it is very annoying for the user!

thanks for helping foreground code master
foreground code is not very bad:

Focus on notepad:
HTML Code:
FindWindow $0 "notepad" ""
IsWindow $0 0 +2
System::Call 'user32::SetForegroundWindow(i r0)'
I agree,it is very annoying for the user,But can used is this code (if p1 run focus p2!) in particular places...
r2du-soft is offline   Reply With Quote