G'day
I've got my program working pretty darn close to how I want for a V1.0.
After discussing with Sergey, I've sat down and "tried" to work out how to write a TCP (Is there anywhere in here that I could put this up just so people could have a look at it and give me ideas on improving it?)
What happens is if I send through a stream of data via a networked computer it works, but if I send it locally (It doesn't matter if I choose the loopback address or the network I.P) it comes up as a cross thread on the form update.
I won't throw the whole load up there, but can anyone see why it may be causing an issue locally, but not from a networked computer?
The updateform sub is where the cross threading occurs.
Again, I'm still learning. Please be constructive.
If I haven't included something, I am willing to include it. If you want the whole thing up, I will put it up.
Private Sub txtboxcreate(ByVal datastring As System.Object, ByRef currenttb As RichTextBox)
Dim count As Integer = 1
Dim tb As New RichTextBox
Name = ("TxtBox" & CStr(counttotal))
With tb
.Name = Name
.Multiline = True
.AutoSize = True
.Width = 250
.ReadOnly = True
.ScrollBars = False
.Tag = 20
.WordWrap = True
.BackColor = Color.Black
.Height = linecount * 22
AddHandler tb.MouseClick, AddressOf Me.TextBox1_MouseClick
End With
textboxestime.Add(tb, 0)
count = (count + counttotal)
currenttb = tb
updatefrm(tb)
append(datastring)
End Sub
Private Sub updatefrm(ByVal tb As RichTextBox)
If InvokeRequired Then
Invoke(Sub() FlowLayoutPanel1.Controls.Add(tb))
Else : FlowLayoutPanel1.Controls.Add(tb)
End If
End Sub