View Full Version : Snap image into pictureBox

May 14, 2009, 15:05:14
I want to snap an image and to put it in a picturebox , I've tried something like this
PctPhotoClient.Image = Image.FromFile("c:\\tmp.bmp"); //picturebox
It works once after I've a problem with the tmp.bmp file.
So I wanted to know If there is a way to capture the image in memory and to use it directly with a picturebox.

Stefan Geissler
May 14, 2009, 15:45:32
ICImagingControl has a Bitmap property. Thus you can write

pictureBox1.Image = IC1.ImageActiveBuffer.Bitmap;

But it seems, you use the IC Imaging Control ActiveX in .NET environment. Do not do this, please use the .NET component of IC Imaging Control.

May 14, 2009, 16:46:37
I've changed to .net object but I've another problem
I do
add references

using TIS.Imaging;

private TIS.Imaging.ICImagingControl NetICImagingControl = new ICImagingControl();
NetICImagingControl.Device = "DFG/USB2-lt";
NetICImagingControl.VideoFormat = "UYVY (768x576)";
NetICImagingControl.LiveDisplayDefault = false;
NetICImagingControl.LiveDisplayZoomFactor = 0.2f;
NetICImagingControl.Height = 115;
NetICImagingControl.Width = 153;
if (NetICImagingControl.DeviceValid)

But now I've this error :
IC Imaging Control is not licensed to be used on your computer!
But I've installed it with your CD installation with the serial number given.
Any idea ?

Stefan Geissler
May 15, 2009, 09:20:26
Did you add the Control on the form? Or do you simply create a new instance with "new IC..." in your code?

Please excuse that you had to wait for my answer 16 hours.

May 15, 2009, 09:41:23
Hi Stefan
No problem for the delay like this I can look by myself
I've created a new instance.

Stefan Geissler
May 15, 2009, 10:09:38
Hi sdcorme,

Please have a look here:

Same problem, same solution, I hope.