Hi,
I want to control the projector through software with LAN/TCP, which i want to write in vb 2010
I wrote small code to send the command to projector to increase brightness. It is executing properly without errors. but projector side nothing is changing.
the command I got it from user manual which i have attached.
Please help me,is there any command problem?
the code is as follows
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Private Sub Bt11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bt11.Click
Dim tcpClient As New System.Net.Sockets.TcpClient()
tcpClient.Connect("192.168.1.50", 1025)
Dim netStream As NetworkStream = tcpClient.GetStream()
If netStream.CanWrite Then
Bt11.BackColor = Color.Green
Dim k As Byte() = Encoding.ASCII.GetBytes(":BRIG 10CR")
netStream.Write(k, 0, k.Length)
Else
Console.WriteLine("You cannot write data to this stream.")
tcpClient.Close()
' Closing the tcpClient instance does not close the network stream.
netStream.Close()
Return
End If
tcpClient.Close()
End Sub
End Class
I want to control the projector through software with LAN/TCP, which i want to write in vb 2010
I wrote small code to send the command to projector to increase brightness. It is executing properly without errors. but projector side nothing is changing.
the command I got it from user manual which i have attached.
Please help me,is there any command problem?
the code is as follows
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Private Sub Bt11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bt11.Click
Dim tcpClient As New System.Net.Sockets.TcpClient()
tcpClient.Connect("192.168.1.50", 1025)
Dim netStream As NetworkStream = tcpClient.GetStream()
If netStream.CanWrite Then
Bt11.BackColor = Color.Green
Dim k As Byte() = Encoding.ASCII.GetBytes(":BRIG 10CR")
netStream.Write(k, 0, k.Length)
Else
Console.WriteLine("You cannot write data to this stream.")
tcpClient.Close()
' Closing the tcpClient instance does not close the network stream.
netStream.Close()
Return
End If
tcpClient.Close()
End Sub
End Class