Click here to Skip to main content
15,905,683 members

Comments by DiamondKid (Top 3 by date)

DiamondKid 25-Feb-17 23:26pm View    
I used that timer from LAN Chat using UDPClient tutorial. I tried Sam's code, but where does the message goes?
DiamondKid 25-Feb-17 23:18pm View    
What should i use?
DiamondKid 25-Feb-17 22:32pm View    
I did what you said and it directs me to this code

Private Sub tmrUDP_Tick(sender As Object, e As EventArgs) Handles tmrUDP.Tick
        Try
            Dim ep As IPEndPoint = New IPEndPoint(IPAddress.Any, 0)
            Dim receiveBytes() As Byte = subscriber.Receive(ep)
            lblColor.Text = ASCII.GetString(receiveBytes)

            If lblColor.Text = "b" Then
                btnBlue.Visible = False
            ElseIf lblColor.Text = "r" Then
                btnRed.Visible = False
            End If

        Catch ex As Exception

        End Try
    End Sub


The above code is for selecting player's color(blue or red). If a player chose Blue, the Button Blue will disappear on the other player's windows form.