LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET picturebox example

 
Hi everybody,
 
I'm using Labview 8.5 Full Dev and .Net2.0
 
I'm trying to solve some limitation of the labview picture control (transparency) using a .Net picturebox.
 
Could some tell where to find and example and create one that demonstrate the use of a .Net picturebox.
For exemple:
- loading an image
- using transparency
- scalling and moving the image
 
Thanks in advance
 
Rodrigue
 
Message 1 of 8
(11,282 Views)
Can't you select the "transparent" color for the picture control, or do you have problems with a text field not having the possibility of a transparent background.

Regards,
André (CLA, CLED)
Message 2 of 8
(11,267 Views)

The problem is that partial transparency is not suported, you can only set a threshold value (http://digital.ni.com/public.nsf/allkb/EEDD9D6EAB559B73862570F200584773),   for the image that you load in you picture control.

Hope you see the problem.

Thanks

Rodrigue

 

Message 3 of 8
(11,263 Views)
I see your problem, but unfortunately my knowledge of the picture is too limited to help you further.

Regards,
André (CLA, CLED)
Message 4 of 8
(11,260 Views)
Well, I can get you part of the way there. Attached is an example in LabVIEW 8.2 on how to load an image into the PictureBox. I also included the test image I created. You need to apply the transparency to the image first, and then load it into the picture box. I colored the front panel with a different color so the transparency is a little more clear.

Can't really answer your question about scaling since I'm not sure if you're referring to the image or the Picturebox, or both?
Message 5 of 8
(11,240 Views)
 
Hi,
 
Thanks for your input. In fact, I was considering scaling and moving the image inside the picture box.
 
Moreover, where can I find reference documents concernint .Net PictureBox.
 
Thxx
Message 6 of 8
(11,226 Views)
Documentation on the PictureBox is available from MSDN. You can get it online at http://msdn2.microsoft.com/en-us/library/system.windows.forms.picturebox(vs.80).aspx, or you can download the .NET Software Development Kit, which includes all the documentation on the .NET classes.

Not sure about how to handle scaling the image inside the PictureBox since it would seem to me that you would need to provide user handles for the image at runtime, and this may be difficult to do. An alternative would be to provide separate controls, like buttons, to allow you to scale and move the image.
Message 7 of 8
(11,222 Views)
You can alpha blend, but you'll have to do the blending yourself. So you
need to be able to read the background of the picture control. If the
picture control itself is transparent, you need to be able to read the VI.

Once you have the background (as a 2d array), you and (for each pixel) blend
it with your own 2d array.

Regards,

Wiebe.


Message 8 of 8
(11,218 Views)