get top windows name


I want to use findwindow and setforegroundwindow to set a window to the top.
But only if it is not on top already (some fullscreen-applications will flicker else)

how can I get the top window's name?

Who is Participating?
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Uset GetForegroundWindow() for the handle...then GetWindowText() for the name...
RuttensoftAuthor Commented:
idle thanks a lot!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.