![]() |
Detecting Window Focus
Is there a native way in Vizard to detect if a windowed application has focus? I am trying to prevent user input events from being passed through to other windows applications, and I would like to have a method to tell the computer to stop listening to the input device when the Vizard window doesn't have focus.
|
You can use the win32gui.GetForegroundWindow function to get a handle to the active window. You can check this handle against the Vizard window handle to determine whether Vizard has focus:
Code:
import win32gui |
Thank you. I will give that a try.
|
All times are GMT -7. The time now is 01:46 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC