Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27336

VS 2010 Projector control software

$
0
0
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 10‘CR’")
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
Attached Images

Viewing all articles
Browse latest Browse all 27336

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>