03-10-2019 11:09 AM
03-11-2019 04:45 AM
Hello Michael,
Yes, I have!
I assume that you are not asking on how to move an Excel windows from Excel (use VBA) or just using your mouse of keyboard (Windows key + right arrow), but from LabVIEW. It's tricky, but the same way as from any other programming language used to move an external application on Windows.
Windows OS has a window manager built-in, called "Desktop Window Manager" on recent Windows versions. You can access it's functionality by calling functions in user32.dll or .NET. You most likely need FindWindowA to get handle of your Excel window, and then functions like SetWindowPlacement and SetWindowPos to move it around.
03-12-2019 08:32 AM
I'm not sure I understand what you mean.
Can I use labview to move Excel or do I have to use an external program ?
Cause I would like to use labview 🙂
I know how to move labview from c#, and I could write an EXE in c# and call that from Labview, but what if I wanted to use labview alone?
Michael
03-12-2019 08:51 AM
Sorry, I'll try to explain better what I meant. You can use any programming language that can access Windows API to move Excel.
Good to know you already know the approach to do so in C# (assuming you are using Windows API and not a built-in LabVIEW function). Doing it in LabVIEW is basically the same.
Depending on what exact approach you took and how proficient you are in LabVIEW, the idea of creating c# code to do so, compiling it into a dll (exe works as well), and then calling that from LabVIEW using the Call Library Function node could actually be quicker for you to implement.