Get last active window in vb 6.0

Hello!

I need to get the last active window. Is there any api for finding that?
When the user focuses on my vb 6.0 application, I want to know what application was activated before that.

Thank you!


         
LVL 1
costinuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonMiddle School Assistant TeacherCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
costinuAuthor Commented:
Thank you for your answer!
I already knew that I could use hooking.
A timer who checks at every moment the active window, will also solve the problem.

But, isn't there any other method ? Because I didn't want to use a hook , neither a timer...
If there is no other way I don't have what else to do, but to use one of these methods.
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
Gotcha...so GetForegroundWindow() is already in your bag of tools, and you're wondering if there is a "secret" tool called GetLastForegroundWindow()?

As far as I know, no such beast exists...  =\
0
costinuAuthor Commented:

That is what I was looking for...
If there isn't such a beast :)) I will use what I have.
Thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.