0

We have been trying to connect to an IP Camera. However, we couldn't achieve it. The camera can only be opened in its own application but we want to open it in the pictureBox1 in winforms. Can you help us how to implement it on winforms and use it there?

Ezgi
  • 23
  • 4
  • 1
    If the camera is programmable you should check with the vendor site to discover any API offered for this task – Steve Sep 07 '21 at 06:35
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 11 '21 at 19:22

1 Answers1

2

An IP-camera does not send you pictures, it sends you webpages that contains the picture. So you should not show the picture in a PictureBox, but in a WebBrowser control.

You can use the WebBrowser Control for this. However, if you are using the internet I'm not sure if this one is save enough. consider to use a better Browser: See Replacing .NET browser with a better Browser

.NET 5 also has an improved Browser WebBrowser

If you really want a picture, consider to interpret the fetched HTML and extract the image. A probably better way would be to access the IP-camera directly, as if it were an internet service. There will probably be methods to request an image.

If you don't have an API, try to access the IP-address in a browser and see what happens. I expect a login screen, but maybe you can find more if you search the internet for your webcam

Harald Coppoolse
  • 28,834
  • 7
  • 67
  • 116