hello friends
I need to create a child window.
but when i am triggering the same event mutiple window is creating.
How can i check whether a the window is already visible or not?
How can i focus on the same if it exists?

Recommended Answers

All 2 Replies

It would help to know what GUI toolkit you're working with; however a good method (in wx) would be to specify the ID of the window, and then check to see if that ID is already being used or not as the basis of opening the window.

in wxpython.

To find out if the window is on the screen or not we call:


If we want to find out if it has the focus then we can use this


And if you want to make if have focus you can use


Hope that helps :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.