Added a dynamic inside add label and picture, the equivalent of the sock label picture is dynamically add
Attributes on the index on the three controls are written by 0, that is, all be regarded as the control group but running only the sock and the picture is the dynamic increase and the label is not increased, solving
Private Sub Listener_ConnectionRequest (ByVal requestID As Long)
Dim SockIndex As Integer: SockIndex=8888
Dim As Integer I
For I=0 To the sock. UBound
If the sock (I). The State=0 Then SockIndex=I
Next
If SockIndex=8888 Then
The Load Picture1 (Picture1. UBound + 1)
The Load Label1 (Label1 UBound + 1)
Load the sock (sock. UBound + 1)
SockIndex=Label1 UBound 'is this a problem, but do not understand what is going wrong, solving
SockIndex=Picture1. UBound
SockIndex=the sock. UBound
Picture1 (Picture1. UBound). The Visible=True
The Picture1 (Picture1. UBound). Left=I * 3000
Label1 (Label1 UBound). The Visible=True
Label1 (Label1 UBound). Left=I * 3000
End the If
The sock (SockIndex). Accept (requestID)
Picture1 (SockIndex). BackColor=& amp; HFF00 & amp;
Label1 (SockIndex). Caption=the sock (SockIndex). RemoteHostIP
End Sub
CodePudding user response:
Finally add a Label1 (Label1. UBound). Zorder try, may be blockedCodePudding user response: