Search code examples
c#.netcameraip-camerasurveillance

Show IP camera using c# windows forms


i'm developing software to display ip camera "Acti", i tried to use axnvUnifiedControl but i cannot find any information about it.

my goal is to connect to the camera using IP, username, and password and display the camera image in windows form.

i'm using c# .net 4.0


Solution

  • This can be done using the following code snippet:

    • First you should reference the OCX in your toolbox, and drag it to your form. but i tried to use it in design mode, but the VS is hang and force close.

      camMedia.MediaSource = CameraIP;    
      camMedia.MediaUsername = UserName;  
      camMedia.MediaPassword = Password;    
      camMedia.HttpPort = HttpPort;//80    
      camMedia.RegisterPort = RegisterPort;//6000    
      camMedia.ControlPort = ControlPort;//6001    
      camMedia.StreamingPort = StreamingPort;//6002    
      camMedia.Connect(0);
      

    where the camMedia is the OCX object name.