LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep or get Focus on Modal LV Window

I created a LV program that is essentually a movable menubar like the MS Office menubar.  When a button is clicked on, it launces a 3rd party app.  I made the Window modal so that it is always visable and won't ever be covered by another window.  The problem is that when another window is active I have to click on the button twice to make it work. Once to give the menubar focus, once to click the button.  I would like the button to always work on the 1st click, like the MS Office menubar.  Maybe I could give the Window focus when the mouse moves over it and the cursor changes to a finger, but I'm not sure how.  I tried using the Topmost vi the WinUtil.llb, but it will not keep the my menubar focused. Any ideas?

0 Kudos
Message 1 of 8
(3,489 Views)
In case you don't find another solution, one idea would be to detect the window enter event and then simulate a click inside the VI using mouse_event. I have thought about looking for functionality which will allow you to click inside a VI and keep the focus in another window (like the windows virtual keyboard does), but I haven't got around to it yet.

___________________
Try to take over the world!
Message 2 of 8
(3,482 Views)

Try

Tools >>> Options >>> Miscelaneous

"Allow Drop Through Clicks"

That sounds like what you are asking for.

Ben

Message Edited by Ben on 01-10-2006 12:53 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 8
(3,487 Views)
Drop thru clicks looks like a great idea, but I can't find it in Labview 8.0.

0 Kudos
Message 4 of 8
(3,468 Views)
Nice one, BenNI. That might be useful for me as well.

___________________
Try to take over the world!
0 Kudos
Message 5 of 8
(3,464 Views)
I found the option in Tools > Options > Environment, but it was already selected. Unforunately it  does not appear to work with a Modal window.   Any other ideas?

0 Kudos
Message 6 of 8
(3,456 Views)

I have no other suggestions at this time.

I am suprised to find that this does not work when the VI is set as modal.

I logged service request # 759677 to get some more information to decide if this is correct behaviour. It almost seems behave counter to what I expected.

When I hear more, I will share more.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 8
(3,440 Views)

Ben - Thanks for your help. Your stars are well earned!
0 Kudos
Message 8 of 8
(3,438 Views)