LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding an overlay image over an activex control

Hello,
 
In my VI I have an ActiveX control containing an image grabbed from a camera.
My aim is to overlay a yellow X in the center of the image for facilitating in centering the camera.
 
Any control or decoration I place sits behind the image, not in front of it.
I tried looking for a way to add an overlayed image to the grabbed image - but I guess it's not supported.
 
I tried to run a separate VI that includes just the yellow X. I managed to get this VI over the image, but LV doesn't enable me to make the background of this simple VI transparent.
I tried placing the VI inside a subpanel. It's transparent all right, but the subpanel is again behind the image.
 
If anyone is willing to try and help me on this riddle, place an ActiveX container, and insert into it either "Microsoft Forms 2.0 Frame" or "Microsoft Forms 2.0 Image". I found these behave the same as my image. Now try to find a way to overlay an X over it.
 
Thanks for your help,
Nitzan
 
 
0 Kudos
Message 1 of 9
(3,867 Views)
Hello,
 
- try to overlay a picture indicator in which you write your X and set to the position you want (resize it so small that only the x is visible),
  if this is not good enough you can
- try to read out the image insert the "x" in the picture and rewrite it into the ActiveX container.
 
Mike
 
 
 
0 Kudos
Message 2 of 9
(3,858 Views)

Hi,

You mentioned that you are utilizing an image from a camera. Are you using NI IMAQ products? If so, here is a KnowledgeBase article that may help you with using the IMAQ Overlay VIs. Happy coding!

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 3 of 9
(3,825 Views)

Hello,

 

I tried placing a picture indicator - but it sits behind the ActiveX control.

Changing the image would be problematic since it's a live video image.

I am not using IMAQ products.

There has to be a way to run a sub-VI, make it floating, and also transparent background.

Another option: how do DVD players make their remote control window have any shape they want? Maybe I can give my sub-VI's window the shape of a crosshair instead of a rectangle. If the sub-VI is floating, it sits on top of the activex control.

Thanks,

Nitzan

 

 

0 Kudos
Message 4 of 9
(3,810 Views)

Hi,

This KnowledgeBase article describes how to make a VI transparent. Perhaps you could set a subVI to this property.

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 5 of 9
(3,796 Views)

Thanks for the tip - it'll be useful when I upgrade to 8.0 (planned for when my boss is in a good mood 😉

Is there any way (programatically) to make the VI transparent on version 7.1?

 

Meanwhile I found a way around that isn't very comfortable, but may interest a few:

To make a cross-hair I place two sub-VIs. One is a vertical line, the other is a horizontal line.

In the VI that I use, the block diagram is just an endless while loop. The front panel is blank and painted yellow. The required stop button is placed out of the way. I customised the window appearance to show nothing but the inside of the front panel.

In my main VI I use a reference to open the sub-VI. I resize the window panel to 100x1 to get just a thin yellow line appear. I do this twice (1x100 the second time) to get the crossing line.

I'm working on a demo for this, coming soon.

Nitzan

0 Kudos
Message 6 of 9
(3,780 Views)

OK, here's the demo I promised.

This demo shows a trick to overlay a decoration or anything else over your VI, over any ActiveX control, and, actually, over your entire monitor screen. This demo also shows how to use template VIs and how to programatically open occurances of a VI.

I hope anyone likes it, is ammused by it, or better yet - finds it useful!

Nitzan

 

0 Kudos
Message 7 of 9
(3,770 Views)
Oops this always happens to me...
Nitzan

0 Kudos
Message 8 of 9
(3,764 Views)

Hi,

That is awesome! Thanks for sharing.

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 9 of 9
(3,753 Views)