Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Window to be on top always

I hope my application always to be on top with another application called labelview.
I try to use Make Window Always on Top.vi and Revoke Window Always on Top. vi or Move Window to Top.vi.
But the problem is I don't know what is the Windows Name/ID, How use Windows function like User32.dll?
Do you have any examples?
 
Wepeace
0 Kudos
Message 1 of 11
(11,095 Views)

Hi shub,

There is a NI Developer Zone example:

Windows API Function Utilities (32-bit) for LabVIEW
http://sine.ni.com/devzone/cda/epd/p/id/4935

If you have any further questions, I suggest posting to a LabVIEW forum.  Experienced LabVIEW specialists continually monitor those forums and can provide a great deal of assistance.

Hope this helps!

Chad Erickson
Switch Product Support Engineer
NI - USA

Message 2 of 11
(11,081 Views)
shub,

I usually reply to this question (which I've answered a few times) this way:

"If I gave you the way to ensure that your window is on top of all other windows on your desktop, what is to prevent someone else from using the same algorithm to make their window sit on top of yours?"

Now that you see that what you are asking for is impossible, you can follow the steps to make your window "top" until some other application does the same with their own windows...

good luck!

-Serge
0 Kudos
Message 3 of 11
(11,078 Views)
Hi,
 
I tried the vi, but I don't know how get the Windows Name to run the function, so it still not work.
 
Could you tell me detail how to use Make Window Always on Top.vi? And I can't find lvwutil32.dll inside.
 
Thank you for your information.
 
Wepeace
 
Wepeace
0 Kudos
Message 4 of 11
(11,061 Views)
To use the function 'Make Window Always on Top.vi' you need to give the VI a string for the name of the window you wish to make 'Always on Top'.  For instance, I see this window on my task bar as 'Reply to Message - NI Discussion Forums - Mozilla Firefox', and if I put that into a string input to the 'Make Window Always on Top.vi' on the block diagram and run the code my browser is set to always be on top of other windows.  The function also allows you to pass in a window refnum instead of a window name string, and there are functions in the library to obtain that refnum.  Any further questions?

-Bob
Message 5 of 11
(11,043 Views)
Hi, Bob,
I go to WINUTIL.LLB, call Get Window Name.vi, after run, got error 6003.
I go to run Get Window RefNum.vi, it needs input Window Name. Is the name of vi? No.
Do you have a program could find the vi's window name?
Thanks,
Bill
 
Wepeace
0 Kudos
Message 6 of 11
(11,038 Views)
There is a VI within the same library that will find a program's window name.  The window name is the name displayed on the taskbar in windows when you run a program.

-Bob
0 Kudos
Message 7 of 11
(11,032 Views)

Thank you Bob. What is the name of VI?

 

Wepeace
0 Kudos
Message 8 of 11
(11,029 Views)
Get Window Name.vi

-Bob
0 Kudos
Message 9 of 11
(11,023 Views)

HI, Bob,

The Get Window Name.vi dose not work, has error message with Windows XP.

I use Get Task List.vi to get Window name, then use Make Window Always on top.vi and Revoke Window always on Top.vi.

It works perfect.

Thank you for your support.

 

Wepeace
Message 10 of 11
(10,995 Views)