LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure for inactive window


@Andrey_Dmitriev wrote:

@mcduff wrote:

. What other conditions, considerations are needed? A quick test showed that the call to the DLL worked. Am I corrupting the memory?


I mean these:

 

The system restricts which processes can set the foreground window. A process can set the foreground window by calling SetForegroundWindow only if:

  • All of the following conditions are true:
  • Additionally, at least one of the following conditions is true:
    • The calling process is the foreground process.
    • The calling process was started by the foreground process.
    • There is currently no foreground window, and thus no foreground process.
    • The calling process received the last input event.
    • Either the foreground process or the calling process is being debugged.

For me (LV2025 Q3 x64 v.25.3.2f2 on Win11 LTSC 24H2 v.26100.4946) SetForegroundWindow doesn't work, the FP window was not brought to the foreground, and the return value is zero (and yesterday evening I was too lazy to check it why exactly).

 

 


That’s a lot to check. Thanks 

0 Kudos
Message 21 of 23
(84 Views)

Could you clarify the behavior you're looking for and not seeing? From your post it sounds like if the screen isn't active, you don't get the "mouse down" event, but that's not what I'm seeing:

 

button.gif

 

When I put the focus back on the forum window, the Mouse in Button indicator works, and when I click it from outside of that window, I get the "mouse down" light coming up.

 

For what it's worth I'm on LV23, 64-bit in Windows 11. I may have changed a setting at some point.in Windows or my LabVIEW INI file to change from default behavior.

 

Or perhaps I'm misunderstanding the question.

0 Kudos
Message 22 of 23
(52 Views)

@BertMcMahan wrote:

Could you clarify the behavior you're looking for and not seeing? From your post it sounds like if the screen isn't active, you don't get the "mouse down" event, but that's not what I'm seeing:

 

...


It must be either a setting or a LV version thing. In LV2021 I don't get "click through" as you are demonstrating in your video, see attached video 

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 23 of 23
(28 Views)