From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrange windows in VI run time menu

Solved!
Go to solution

Hi all,

 

I'm probably missing something obvious, but...

 

I'm writing a program which is going to open a lot of windows. I want my customer to have the option to go to the "Window" menu and press Tile, or Arrange, and have all windows be tiled automatically. I thought this would be trivial, as the run time menu already has Window->Arrange. But It doesn't appear during run time and I couldn't figure out how to make it available. Does anyone have any ideas?

 

Thanks in advance!

Danielle

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

On your VI, in edit mode, go to Edit»Run-Time Menu... and look to see if a custom menu has been created.  The default menu should have tiling options.  If you need to add the tiling options, select Application Item and the appropriate Window function.  Consult the LabVIEW help if you need more details.

0 Kudos
Message 2 of 14
(3,214 Views)

"The default menu should have tiling options": That is exactly my problem. Arrange is there (as well as tile left and right, which isn't good for more than two windows). However, it doesn't appear at runtime. How do I make it appear at runtime?

 

Thanks,

Danielle

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

Hi,

 

I forgot to say that I'm using hte default run time menu, not a custom one.

 

Thanks,

Danielle

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

This is a little interesting.  In my development environment the last item in my Window menu is All Windows.  But if I go to Edit >> Run Time Menu, with the Default menu items after the All Windows item, there is an Arrange item.  But the preview of my menu (still in the menu editor) doesn't show the Arrange item.

 

If I try to make a new menu item with the tag APP_ARRANGE_WINDOWS it turns red and prevents me from making it.  What is this arrage item and is this a feature of LabVIEW I have gone this far not knowing?

0 Kudos
Message 5 of 14
(3,190 Views)

Hi all,

 

I tried adding htis item programmatically and got the following: error 1159: Cannot find one or more application items.

 

How can Labview not find an application item? Does anyone know I can add it to my program? I'm using LV 2012.

 

Thanks,

Danielle

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

I can create a menu with the Arrange item, but it does not show up at run time.  I have filed CAR #420225 to track this issue.  Unfortunately, there is no good workaround.  The best I can offer is to use VI server calls to do it yourself.  If you would like to do this and have problems, let us know.

0 Kudos
Message 7 of 14
(3,132 Views)

FYI, the Arrange menu item was part of a LabVIEW effort that never made it out the door.  It was accidentally exposed, but never really implemented - so it does not work.  The fix will likely be total removal.  Let us know if you need help implementing an alternative.

Message 8 of 14
(3,119 Views)

Thanks for the answer! I'll try using windows or VI server calls.

 

Thanks,

Danielle

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

Hi,

 

I left this project for a while and came back to it now. Calling TileWindows in user32.dll caused LabView to crash. Anyone know what I'm doing wrong?

 

Also, calling other functions in user32.dll caused an error even though the output was success, e.g. showWindowAsync function in BringToFront.vi.

 

To reproduce the crash, run TestGeneralVI, then run testTileWindows. I also tried it without a hWnd at all (so it should use the desktop according to the API) and tried playing with the input parameters a bit. It always crashed.

 

To reproduce the error even though succes, put BringToFront in place of TileWindows in TestTileWindows. It brings testGeneralVI excellently and outputs an error. I manually remove this if success = true.

 

Any help would be appreciated.

 

Thanks,

Danielle

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