Click here to Skip to main content
15,892,809 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: image loop in vb.net Pin
Henry Minute7-Jun-09 1:22
Henry Minute7-Jun-09 1:22 
GeneralRe: image loop in vb.net Pin
riced7-Jun-09 1:30
riced7-Jun-09 1:30 
AnswerRe: image loop in vb.net Pin
bapu28897-Jun-09 2:29
bapu28897-Jun-09 2:29 
GeneralRe: image loop in vb.net Pin
Henry Minute7-Jun-09 4:45
Henry Minute7-Jun-09 4:45 
QuestionCommunicating over LAN in VB Net Pin
Jon11226-Jun-09 11:05
Jon11226-Jun-09 11:05 
AnswerRe: Communicating over LAN in VB Net Pin
Moreno Airoldi7-Jun-09 1:41
Moreno Airoldi7-Jun-09 1:41 
AnswerWebservice Pin
David Mujica8-Jun-09 3:29
David Mujica8-Jun-09 3:29 
AnswerRe: Communicating over LAN in VB Net Pin
Jon11229-Jun-09 10:53
Jon11229-Jun-09 10:53 
Thanks I found it relatively easy actaully, though I understand the code, I'm having a bit of trouble.
I got a VB app to send text to another VB app on a different PC then got a website (On my local network) to send text to the VB app (using TCP/sockets or whatever).

This is the code I have atm in the VB app:
Sub Main()
     ' Must listen on correct port- must be same as port client wants to connect on.
     Const portNumber As Integer = 8000
     Dim tcpListener As New TcpListener(portNumber)
     tcpListener.Start()
     Console.WriteLine("Waiting for connection...")
     Try
         'Accept the pending client connection and return
         'a TcpClient initialized for communication.
         Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient()
         Console.WriteLine("Connection accepted.")
         ' Get the stream
         Dim networkStream As NetworkStream = tcpClient.GetStream()
         ' Read the stream into a byte array
         Dim bytes(tcpClient.ReceiveBufferSize) As Byte
         networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize))
         ' Return the data received from the client to the console.
         Dim clientdata As String = Encoding.ASCII.GetString(bytes)
         TextBox1.Text = clientdata

         'Any communication with the remote client using the TcpClient can go here.
         'Close TcpListener and TcpClient.
         tcpClient.Close()
         tcpListener.Stop()
         Console.WriteLine("exit")
         Console.ReadLine()
     Catch e As Exception
         Console.WriteLine(e.ToString())
         Console.ReadLine()
     End Try


That is then called when form1 loads. The problem I have is unless I have me.show() before calling the above sub, the form will not show. And when I do have me.show() the form is frozen (though it doesnt have "Not Repsonding").
Also after I have sent some text I can't send any more without restarting the app.

Some help would be greatly appreciated, I have trawled google for several issues I had with PHP and IIS so please forgive for asking straight here and not bothering with google.

Jonathan
AnswerRe: Communicating over LAN in VB Net Pin
Jon112212-Jun-09 20:27
Jon112212-Jun-09 20:27 
QuestionThe problem of my form does not respond, The problem of my form does not respond [modified] Pin
pobre126-Jun-09 9:52
pobre126-Jun-09 9:52 
AnswerRe: The problem of my form does not respond, The problem of my form does not respond Pin
Dave Kreskowiak6-Jun-09 10:01
mveDave Kreskowiak6-Jun-09 10:01 
GeneralRe: The problem of my form does not respond, The problem of my form does not respond [modified] Pin
pobre126-Jun-09 10:11
pobre126-Jun-09 10:11 
GeneralRe: The problem of my form does not respond, The problem of my form does not respond Pin
Christian Graus6-Jun-09 12:53
protectorChristian Graus6-Jun-09 12:53 
QuestionVB 2008 express example Pin
A Wyatt6-Jun-09 4:28
A Wyatt6-Jun-09 4:28 
AnswerRe: VB 2008 express example Pin
Dave Kreskowiak6-Jun-09 4:48
mveDave Kreskowiak6-Jun-09 4:48 
QuestionProblem creating ForeignKey between DataTables Pin
carrigart6-Jun-09 2:50
carrigart6-Jun-09 2:50 
AnswerRe: Problem creating ForeignKey between DataTables Pin
Dave Kreskowiak6-Jun-09 4:46
mveDave Kreskowiak6-Jun-09 4:46 
GeneralRe: Problem creating ForeignKey between DataTables Pin
carrigart6-Jun-09 4:50
carrigart6-Jun-09 4:50 
GeneralRe: Problem creating ForeignKey between DataTables Pin
Henry Minute6-Jun-09 9:41
Henry Minute6-Jun-09 9:41 
GeneralRe: Problem creating ForeignKey between DataTables Pin
Dave Kreskowiak6-Jun-09 9:52
mveDave Kreskowiak6-Jun-09 9:52 
QuestionCalculator Pin
keymoney6-Jun-09 2:41
keymoney6-Jun-09 2:41 
AnswerRe: Calculator Pin
Dave Kreskowiak6-Jun-09 4:44
mveDave Kreskowiak6-Jun-09 4:44 
AnswerRe: Calculator Pin
molesworth6-Jun-09 7:28
molesworth6-Jun-09 7:28 
QuestionPopulate a Treeview Pin
wr30286-Jun-09 1:36
wr30286-Jun-09 1:36 
QuestionRichTextbox Text Alignment Pin
Paramu19735-Jun-09 21:01
Paramu19735-Jun-09 21:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.