Focus
-
Sounds like a relatively simple Win32 project... hook SetForegroundWindow; only pass the call on if the passed HWND is in the same process as the HWND returned by GetForegroundWindow.
liquidplasmaflow wrote:
Sounds like a relatively simple Win32 project... hook SetForegroundWindow; only pass the call on if the passed HWND is in the same process as the HWND returned by GetForegroundWindow.
...And in the meantime captures Christian keystrokes...(Maybe useful for Pete's researches, who knows?) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Dare I suggest such a thing as dwm[^] in a place such as this? ;P Really works a treat!
Paul
Pauliastan in The Code Project, password:
byalmightybob
How much time is left?[^] -
liquidplasmaflow wrote:
Sounds like a relatively simple Win32 project... hook SetForegroundWindow; only pass the call on if the passed HWND is in the same process as the HWND returned by GetForegroundWindow.
...And in the meantime captures Christian keystrokes...(Maybe useful for Pete's researches, who knows?) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]:laugh:
-
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Can I get an Amen! I particularly hate the fact that outlook thinks it should be on top when it starts up.
-Sean ---- ????? ?????????
-
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
"Not now, Kato, not now!" -- Jacque Clouseau
-
liquidplasmaflow wrote:
Sounds like a relatively simple Win32 project... hook SetForegroundWindow; only pass the call on if the passed HWND is in the same process as the HWND returned by GetForegroundWindow.
...And in the meantime captures Christian keystrokes...(Maybe useful for Pete's researches, who knows?) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]I'd better hope Christian doesn't get a keylogger. He'll think it's me.
Deja View - the feeling that you've seen this post before.
-
Agreed. I'd be willing to buy a utility that stopped any cross process focus stealing (that didn't have bugs of its own) in a heart beat.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Actually, Bush asked Homeland Security to ask Microsoft to put in this feature. It's supposed to help find terrorist activity. Marc
-
Agreed. I'd be willing to buy a utility that stopped any cross process focus stealing (that didn't have bugs of its own) in a heart beat.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
Sounds like a relatively simple Win32 project... hook SetForegroundWindow; only pass the call on if the passed HWND is in the same process as the HWND returned by GetForegroundWindow.
That's already been implemented (as of Windows 2000, if i recall correctly). Of course, this doesn't stop programs from stealing focus from themselves which, from the sound of it, is what CG is referring to. And frankly, it stops less and less of anything as time goes on, as there are ways around it and every program under the sun thinks it's pop-ups are so incredibly important that they must intrude upon the user at all times.
-
Can I get an Amen! I particularly hate the fact that outlook thinks it should be on top when it starts up.
-Sean ---- ????? ?????????
I particularly hate the fact that Outlook must set focus back to its main window before opening a new top-level window. Of course, that's just the tip of the iceberg - it also appears to use its own internal window manager, carefully written to act more-or-less like the standard Windows window manager except that it eats a mouseclick that gives focus to the window (so you need to click twice on any area of the window if that window doesn't currently have focus), maintains some bizarre parent-child relationship such that you can have any number of views of any number of messages, folders, etc. so long as you don't close the first one, and locks all top-level windows if any top-level window has a modal dialog open. But then, all of the Office apps do bizarre things when it comes to managing their own top-level windows. Which should tell you something: if the biggest profit center in MS can't get the Windows window manager fixed, then none of us have a prayer.
-
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
My favourite is when I'm downloading a very large file and, upon finishing the download, the dialog pops up showing that it's being copied from a temporary folder to it's destination. Naturally, that's when I'm hitting the Enter key to start a new paragraph in Word which instead pushes the default Cancel button on the copy dialog. :sigh: Cheers, Drew.
-
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
What's worse than that is when the window that is brought to the front is indeed important (e.g., error message, warning), but you've quickly dismissed it by typing.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
I have a vague memory that they tried to get rid of this in XP. I suspect a lot of people complained. I want the OS to discern my unstated intentions are when deciding to switch focus. It should know whether doing so will irritate me or make me happy.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
I have a vague memory that they tried to get rid of this in XP. I suspect a lot of people complained. I want the OS to discern my unstated intentions are when deciding to switch focus. It should know whether doing so will irritate me or make me happy.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
Joe Woodbury wrote:
I have a vague memory that they tried to get rid of this in XP.
Yup - something to the effect that
SetForegroundWindow()
and kin stop working when the foreground window is owned by a different process (with some sort of exception for programs that are being launched and therefore should be able to take focus from the program that launched them). When it works, it's great - you see a little flashing taskbar button indicating the program wants your attention, but if you're busy elsewhere you just ignore it and everything keeps working. Except, of course, in apps like IE where multiple top-level windows share the same process. Apparently, making the world safe for pop-up advertisers was more important than reducing user annoyance.Joe Woodbury wrote:
I suspect a lot of people complained.
Yup. And so we get a heapin' helpin' of hacks to get around it. Using
AttachThreadInput()
to associate your program with whoever owns the active window is a common one. The never-ending battle between users and the evil software developers who want to hurt them know better than them. -
One thing I hate about windows is how applications jump up into focus. This is especially true of IE. I can't tell you how often I've typed my internet banking password into a CP window. I often am doing 5 things at once. I KNOW what they are. I don't need to be interrupted in what I am doing because some app decided it knows better than I do what I want to do next.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
I couldn't agree more - I hate this about windows! I've once *SENT* a password to someone in a chat window because I typed the password followed by ENTER but as I did so a chat window came to the forefront. Windows should be smarter than that... but somehow all the "smartness" went into making translucent form edges and 3D-flipping :doh: