Showing results for 
Search instead for 
Did you mean: 

How to resize/move any window

Go to solution

I don't know if it is possible but is there a way to resize wondows on the monitor that don't belong to a LabVIEW VI? I know you can move windows to the front with windows API calls but is it possible to resize ot move them? I just want to be sure I'm not on a wild goose chase.

0 Kudos
Message 1 of 7

Have you looked into .NET or ActiveX calls?

0 Kudos
Message 2 of 7
Call Win32 dll with LabVIEW and use related function
I think there is function that you can resize windows
0 Kudos
Message 3 of 7

The WinAPI function SetWindowPos will do both:


You can use MoveWindow, too:


Use the FindWindow function to get the window handle you need above:



0 Kudos
Message 4 of 7

Windows API Function Utilities (32-bit) for LabVIEW



George Zou
0 Kudos
Message 5 of 7

That's great news. I was able to get a VI up and running to move and resize windows and child windows. I ran into an issue trying to control windows on a remote desktop session. I assumed they would be child windows of the desktop session but that doesn’t seem to be the case. Does anyone have an idea or possible way to get window handles for windows in a remote desktop session?

0 Kudos
Message 6 of 7
Accepted by Brandon.Baxter

A remote desktop session is basically just showing you an image of what's going on, it's not a proper program with child windows.


If you want to control those windows, you'd have to write a server app on the remote PC that your LabVIEW program communicates with.  You would have to send the server a message to resize the window and have the remote program run the actual resize.

0 Kudos
Message 7 of 7