05-19-2016 05:07 PM
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.
Solved! Go to Solution.
05-20-2016 12:24 AM
Have you looked into .NET or ActiveX calls?
05-20-2016 05:06 AM
05-20-2016 05:23 AM
The WinAPI function SetWindowPos will do both:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx
You can use MoveWindow, too:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633534(v=vs.85).aspx
Use the FindWindow function to get the window handle you need above:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx
05-20-2016 09:23 AM
05-23-2016 08:20 AM
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?
05-23-2016 08:54 AM
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.