LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Property.SetWindowBounds

Hallo LVers,

I'm using LV5.1.1 and NT4.0.

I have a.vi which opens b.vi, run that VI, shows b.vi front panel, adjusts
b.vi windows-dimension.
When I want to adjust b.vi's dimensions, I always get errorcode 1 or
errorcode 7 back from the Property function. I already had this thing
working in a example, but now it doesn't in the real application, and I
can't even make my example reproduce that error, example is working. Now
where could be the strange difference ???

1. Do I have to adjust a special VI-Setup of b.vi. In the end, I want to run
b.vi without any toolbars, scrollbars, title-bars and buttons. But at the
moment I've returned to an ordinary Setup with everything, just for debug
purposes, no effect! Does my VI
-Setup affect the ability to adjust my
dimensions via Property ?

2. Is there a certain order, which I have to go for ? At the moment I have
a)OpenReference b)RunVI without wait c)SetDimensions d)ShowFrontPanel but
I've played around with this order and already tried abdc or acbd, no
effect.

3. Errorcode 1 means invalid parameter. I have wired a quadruple 16bit
unsigned integer to the input, this should be correct, isn't it ? Errorcode
7 means FileNotFound, but all oerations prior to the adjustment are
successful, so LV finds b.vi and successfully opens a refernce to it, also
running and showing are succesful!
0 Kudos
Message 1 of 2
(2,335 Views)
Hi Oliver,

The Error 1 code might because the value you are trying to setup is out side the valid range. eg if set to zero this will produce error 1. Or maybe the other three parameters are set incorrectly.

The Error 7 is returned when the Open VI Reference cannot find the actual VI to open.
If you are running in an EXE file, and using the Current VI path constant. Remember to strip off the VIname.exe to get back to actual vi path.

I have provided a small demo VI in zip file
Four I16 controls are provide to modify the window bounds of MYVI.VI. I Obtain the initial value and then bundle in the four control. If I set one of the controls to 0. This will produce ERROR 1.


Hope this helps.


Regards
Ray.
Regards
Ray Farmer
0 Kudos
Message 2 of 2
(2,335 Views)