gilmorenator
New member
Hi Guys,
I'm pretty new to controlling devices using vb.net, I have used the Winsock control to create chat applications etc.
I now wish to control an IP camera using a forms application, I am able to get the video etc back no problems; the problem arises when attempting to move the camera; left, right, up and down.
The camera has it's own webpage http://193.160.171.38 - and has controls to pan the camera - it seems to use CGI for this so to move left the url is http://193.160.171.39/cgi-bin/camctrl.cgi?move=left so I want to replicate this using buttons on the form - I have attempted to do this using the winsock control but it keeps returning an error so I hope you can point me in the right direction.
Here is a code snippet of the form load event and the button click to move the camera right:
Hope you can tell me were i'm going wrong or point me in the direction of a sample / tutorial.
Thanks in advance,
Dave
I'm pretty new to controlling devices using vb.net, I have used the Winsock control to create chat applications etc.
I now wish to control an IP camera using a forms application, I am able to get the video etc back no problems; the problem arises when attempting to move the camera; left, right, up and down.
The camera has it's own webpage http://193.160.171.38 - and has controls to pan the camera - it seems to use CGI for this so to move left the url is http://193.160.171.39/cgi-bin/camctrl.cgi?move=left so I want to replicate this using buttons on the form - I have attempted to do this using the winsock control but it keeps returning an error so I hope you can point me in the right direction.
Here is a code snippet of the form load event and the button click to move the camera right:
VB.NET:
Private Sub frmHouseControl_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
picTimer.Enabled = True
wSock.Connect(193.160.171.38, 80)
End Sub
Private Sub btnPanRight_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPanRight.Click
Try
wSock.SendData("/cgi-bin/camctrl.cgi?move=right")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Hope you can tell me were i'm going wrong or point me in the direction of a sample / tutorial.
Thanks in advance,
Dave