该内容不适用于您选择的语言

该内容将以另一种语言显示出来。 您可使用浏览器的翻译功能查看内容。

Determine the Active Window in LabVIEW

Updated Aug 17, 2023

Reported In

Software

  • LabVIEW

Issue Details

I need to programmatically determine which window is active on my computer using LabVIEW. 

Solution

Call GetForegroundWindow function from Windows' user32.dll using the Call Library Function node on your block diagram to return the handle of the active window. You can also call the GetWindowText function to return the name of the active window.