ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Widow focus

I have an VI which goes off and calls another application (in this case ActiveSync), for whatever reason ActiveSync grabs the windows focus, and when it exits I can't seem to find a reliable way for my front panel to regain its focus(Ie to get its blue border back, and not a background grey. This is important as I want to set a certain control to have focus.

I've tried making it modal, setting the IsForemost property.

Anyother ideas?
0 Kudos
Message 1 of 5
(3,061 Views)
Hello Wojtek

You can try another way:
1.- download lvwutil32 fron this link
2.-Use windows vis to get handle to your window.
3.-When you want to regain control over you window, use apropiate vi to declare your window top an active.

Hope it helps

Greetings
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 2 of 5
(3,040 Views)
Can you run ActiveSync first, then minimize it, then run your app? Is there a way to configure ActiveSync to run minimized. I've used Active Sync before with labview and I don't remember it taking focus. Unfortunatley I no longer have access to that project and I don't really remember the details on how it was set up.
- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 5
(3,033 Views)
Yep, That done the trick. Thanks for the pointer in the right direction.
0 Kudos
Message 4 of 5
(3,013 Views)
...I don't know th reason as I didn't write the dlls that call ActiveSync, but on connection the focus is lost and doesn;t come back when active sync is done.
0 Kudos
Message 5 of 5
(3,011 Views)