LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrange windows in VI run time menu

Solved!
Go to solution
Solution
Accepted by topic author dsavir

Hi Danielle,

 

I was able to get the functions to run without error by modifying the call library function node within the TileWindows.vi. It seems as if you're using the C calling convention, whereas you might want to be using the stdcall (WINAPI) convention instead. I was able to succesfully run TestGeneral and testTileWindows, and when I substituted BringToFront in, it managed to bring TestGeneralVI to the front.

 

Let me know if this works for you. Just double click on the call library function node in TileWIndows, and change the calling convention to stdcall (WINAPI). 

 

Regards,

Harsha 

Message 11 of 14
(514 Views)

It works perfectly now. That is so cool! Thank you very much.

 

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 12 of 14
(491 Views)

So this is really neat.  So setting the parent window to 0 (meaning the desktop) and then passing an array of HWND in causes it to tile the windows as expected on the whole monitor.  Similarly if you have a parent window with children the same works as you would expect.  

 

But one thing to be aware of is using this you can set the front panel window to a size that you may not want.  I tested this by setting a VI to have a minimum size greater than half my screen, then performed the tile on two window.  It made both windows take up 1/2 the screen, and as soon as I went to resize the window at all, it went back to the minimum size I specified in the VI.  So in some cases it might be best to just stick with the VI server controls, to tile the VI panels manually.

0 Kudos
Message 13 of 14
(465 Views)

You are right, it might be better to do my own using the VI Server. I just didn't want to check and code all the end cases, so I thought using Windows' built in function might be easier...

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 14 of 14
(447 Views)