From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Picture Control shows paint can when code is running

When using a mouse to move an object (change display) on the picture control, which originally showed the mouse pointer (hand pointing), now shows a pain can, similar to the color fill in MS Paint.

 

There are multiple programmers working on the code, so anything could have happened at any point in time.  Fortunately, there are backup copies of the code...

 

However, how did it change and where does it get that fill (paint can) pointer from?  Also, is there an easy way to revert it back?

Has anyone ever seen this before?

 

Thanks,

 

RayR

0 Kudos
Message 1 of 7
(2,647 Views)

Hello,

 

The picture control can behave in a strange way sometimes...

 

For example when you set its default values, you can't get the mouse position in it anymore unless you delete the control on the FP and recreate it.

 

In your case this might be something similar, did you try deleting it and recreating it ?

 

I assume you are using it in an XControl ?

 

Regards,

Da Helmut
Voir le profil de Maxime M. sur LinkedIn - View Maxime M.'s profile on LinkedIn
0 Kudos
Message 2 of 7
(2,628 Views)

Pardon my completely lame two-minute attempt at dragging around in a picture control.  Dealing with the cursor can be a bit of a pain for me at times, I usually try to dutifully return it to the state from which I changed it.  Lately I just say screw it and intentionally leave the cursor id unwired, the error causes LV to revert to the default cursor. 

 

As for the paint can, I assume the cursor is being changed in there somewhere, I find it more helpful to use a control created from the Set Cursor VI than to try to use a constant.  This way you get a nice pict ring with the cursor images.

 

OR, this is all unrelated and you have once again managed to mangle something...

0 Kudos
Message 3 of 7
(2,620 Views)

Edit time expired, my example stopped throwing an error when I closed and reopened, but the effect is the same.  Leaving the inputs to Set Cursor VI unwired should give you the default cursor regardless of the polymorphic instance selected. 

 

My day is not complete unless I see something strange from LV.

0 Kudos
Message 4 of 7
(2,612 Views)

The picture control already has an initial picture (or drawing) that was done by the client, so it's not a matter of deleting and re-creating it.  At least not easily.

 

Not using ActiveX.  You suggestion does make sense because of the paint can image which is usually associated with other applications.  Not in this case.

 

I have not yet looked at Darin's VI (simply because this PC doesn not have LV2k9)  I will look at it soon.

 

What's the scoop on this picture control.

 

Well, it is a square Picture Control with a picture in it.  It is basically the front panel (that is shown) when the Dynamic VI is called from the main VI.  Yes, the picture control is part of a Dynamic Vi which is called by the main VI (repeating myself) and placed inside a sub-panel.  From the front panel of the main VI, it is possible to move the picture with a mouse.  That's where the mouse cursor appeared as a hand with a finger pointing.  Recently, it turned into a paint can icon.  Not sure where it picked that up...   There is no reference to any icon in the code of the Dynamic VI.  And nothing in the main VI.

 

Unrelated to this is the fact that both the main and the dynamic VI use LVOOP.

0 Kudos
Message 5 of 7
(2,601 Views)

I'm pretty sure I've seen something similar as well in the past couple of weeks (probably Win 7, LV 2009). In my case, I don't think it was in any important code, so I didn't bother chasing it down, but I think that case didn't have any cursor-manipulating code either. I don't remember what the code was, so I don't know for sure that it was the picture control in my case, but I'm pretty sure it was.


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(2,586 Views)

More info...

 

According to the client, when running an executable of the same software, the pointer is the normal one.

Only in development mode does it display the paint can.

 

I have not yet confirmed the behavior with an executable.  It is odd that the icon would change in the first place...

 

- strange -

0 Kudos
Message 7 of 7
(2,575 Views)