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

VS 2010 [Help] Working With Threads To Create New Form & Using It

$
0
0
Hello :)

Am Trying to develop chat application but i have a little problem

in my application there's server & client

server in user's Pc & the client in admin Pc

when i Receive a msg from the user the msg Received successfully but when i send msg to the server the msg received successfully but i can't show it in the chat form

Am using this way to open new chat form in the server

Code:

Dim f As Form2 = Application.OpenForms("chat")
If f Is Nothing Then
If Me.InvokeRequired Then
Me.Invoke(New _data(AddressOf Data), New Object() {b})
Exit Sub
End If
f = New Form2
f.Name = "chat"
f.Show()
End If

and when i receive a new msg from client i use this way

Code:

Dim f As Form2 = Application.OpenForms("chat")
f.Recv.Text += Environment.NewLine & "i~Admin~i: " & Rec(1)

What's the proplem in this code ?

& Btw iam using the same way in the client & it works successfully.


Viewing all articles
Browse latest Browse all 27246

Trending Articles



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