LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i automatically maximize lab view project (if project is minimized) if no one is working on PC after one time

Solved!
Go to solution

where is "get foreground window" and "set foreground window" in labview 2016?

0 Kudos
Message 21 of 38
(801 Views)

Hi Asif,

 

as you apparently read Blokk's link you should have seen this part of the text:

Solution: If you use the functions GetForegroundWindow and SetForegroundWindow in the User32.dll located in C:\WINDOWS\system32, the Front Panel is set in front of all desktop windows.

These are CLF nodes ("Call Library Function")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 22 of 38
(799 Views)

really i dont know how to do that.

i can see user32.dll file in that location.but how to use it as that snip..

0 Kudos
Message 23 of 38
(795 Views)

I do not want to be mean or anything, but you could really try to do some effort, and use google search, LabVIEW help, LabVIEW tutorials, etc... 😉

 

http://zone.ni.com/reference/en-XX/help/371361P-01/glang/call_library_function/

0 Kudos
Message 24 of 38
(791 Views)

I tried the official NI example VI, it does not work for me. I have also found this: http://www.labvolution.com/labview-making-a-window-active/

Neither works. I have no time to experiment with these codes now, I might test more later...

0 Kudos
Message 26 of 38
(773 Views)
Solution
Accepted by topic author Asif138

Actually this example works, I had a typo only: http://www.labvolution.com/labview-making-a-window-active/

Download the example VI, and set the name input the same as the VI's name: "Window to Front.vi".

Here is a snippet too (I also attached the example VI):

 

Window to Front.png

 

 

0 Kudos
Message 27 of 38
(769 Views)

it is working, but some time it automatically maximized but not be on top of all window.

 

Thanks,

0 Kudos
Message 28 of 38
(743 Views)

@Asif138 wrote:

it is working, but some time it automatically maximized but not be on top of all window.

 

Thanks,


For me my example VI works 100%. Can you reproduce the problem, and attach your VI or snippet? How often it does not come to foremost, top of all windows?

0 Kudos
Message 29 of 38
(740 Views)

i am running same your VI in my PC..

0 Kudos
Message 30 of 38
(727 Views)