LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with setting size of VI

Hi all,

I have a problem with trying to resize and position my VI. What I want to do is use data from the screen size and another VI to create the size and position of another VI so that I can display them next to each other, no matter what the screen resolution is. However if I try to set the bounds of the VI window or panel, I always get an error and although the window ends up in the right position, the size is not correct and changing the input values to get the size (right/bottom) does not seem to do anything.

I have added three screenshots. The error2.PNG is of the error that occurs, vi-bounds2.PNG of the block diagram code that I use. It kinda works if I link up the clear errors vi, but I think this is not the way to go. vi-bounds-noerror2.PNG is of code from another VI which does not lead to any errors. I do not see the difference however, because I tried setting the window bounds as well as the panel bounds but the error stays the same.

I hope someone can help me!

Thanks, Steph.


Message Edited by StephK on 02-12-2008 07:02 AM
Download All
0 Kudos
Message 1 of 9
(3,556 Views)

Hi Steph,

could it be that the result window size is to small? I test it on my pc and if i make the window size to small a get the same error.

Mike



Message Edited by MikeS81 on 02-12-2008 07:18 AM
0 Kudos
Message 2 of 9
(3,547 Views)
How many monitors do you've got?
If you got just one, the top and bottom will be 0...
You read the size of the second monitor.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 9
(3,538 Views)
@TonP: I am using 2 monitors and it needs to be positioned on the second monitor, so that is not the problem

@Mike: it does indeed seem to work if I make the bottom and right values really big, but I do not have that much space and I do not see why I would need it as the front panel items are not that big. I thought that setting the bounds of the panel would make sure that it would fit.. but do I need to resize the front panel in another way then?
0 Kudos
Message 4 of 9
(3,528 Views)
The error occurs in VI-bounds2 right?
What's the value of the bounds that fail?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 9
(3,519 Views)
If I set the bottom value lower than 768 (the screen height) the error occurs, if I make that value bigger, there is no error. The same goes for setting the right value smaller and resp. bigger than 258. Both if I set the top and left value at 0. Changing those, it is hard to distinguish what value is causing errors.
0 Kudos
Message 6 of 9
(3,514 Views)
I have tried experimenting with it a bit more. If I change the left value so that the VI is on the second screen, then an error will occur if the height is 771 or less and if the difference in width between left and right is 257 or less.

Anyway I just want to be able to say what the size of the VI, not considering the size of the front panel items. They should just resize if it will not fit otherwise. I do not see why that is not happening..
0 Kudos
Message 7 of 9
(3,504 Views)
Their is a property 'Minimum panel size' (VI-Options->Window size), maybe that is set?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 9
(3,485 Views)
Thanks for the tips. It wasn't the minimum size that was set.. so I do not know what caused the problems. But I copied everything in a new VI and it is working the way I wanted it now.. I guess that some property somewhere must have been set wrongly, but I do not have a clue what it was. Anyway no problems with it anymore, thanks for the comments!
0 Kudos
Message 9 of 9
(3,482 Views)