Relax already, sheesh, we all can't sit here and read this board 24 - 7.

But since you asked so nicely, I am gonna show ya what you need. I have done multiple downloads through IRC, and this code works great for me. There are probably a couple of variables dimensioned that you do not need, so don't worry about them. The way I have it set up is I have a MDIChild form set up with a Winsock on it, and I just make a new instance of it everytime I want to download a new file. Set up a MDIChild form named whatever, mine's named DCCFileRecieved.

VB Code:
  1. Public fileName As String
  2. Public senderName As String
  3. Public fileSize As String
  4. Public I As Integer 'hold the file number of the opened file
  5. Public totalSize As Double
  6. Public goodFile As Boolean
  7. Public lastTime As Long
  8.  
  9.  
  10. Public Sub startNewSession(ip As String, port As String)
  11.     If WS.State <> sckClosed Then
  12.         WS.Close
  13.     End If
  14.     WS.Connect ip, port
  15.     T.Enabled = True
  16. End Sub
  17.  
  18. Private Sub WS_DataArrival(ByVal bytesTotal As Long)
  19.     On Error GoTo err:
  20.     Dim strData As String
  21.     Dim size
  22.     WS.GetData strData, vbString
  23.     Print #I, strData;
  24.     size = LOF(I)
  25.     totalSize = totalSize + bytesTotal
  26.     lblRecieved.Caption = FormatNumber((totalSize / 1024), 2) & " K"
  27.     PB.Value = totalSize
  28.     If totalSize >= lblSize.Caption Then
  29.         Close #I
  30.         goodFile = True
  31.         WS.SendData lblSize.Caption
  32.         WS.Close
  33.         fileRecieveDone fileName, lblUserName.Caption
  34.         Unload Me
  35.     End If
  36. err:
  37.    If err.Number <> 0 Then
  38.         If WS.State = 6 Then
  39.             Exit Sub
  40.         ElseIf err.Number = 11 Then
  41.             Resume Next
  42.         Else
  43.             Resume Next
  44.         End If
  45.     End If
  46. End Sub
  47.  
  48.  
  49. Public Sub openFile()
  50.     I = FreeFile
  51.     If Len(App.Path & "\Download\" & fileName) > 0 Then 'looks to see if file exists
  52.         Open App.Path & "\Download\" & fileName For Output As I
  53.         Close #I
  54.     End If
  55.     Open App.Path & "\Download\" & fileName For Output As I
  56. End Sub
  57.  
  58. Private Sub T_Timer()
  59.     On Error Resume Next
  60.     DoEvents
  61.     Dim total As Double
  62.     total = (totalSize - lastTime)
  63.     lblSpeed.Caption = FormatNumber((total / 1024), 1) & " Kps"
  64.     lblTime.Caption = ((lblSize.Caption - totalSize) / total) * 60
  65.     lastTime = totalSize 'lastTime is the variable holding the size of the file the last
  66.                          'time the timer was called
  67. End Sub
  68.  
  69. Private Sub WS_Close()
  70.     If goodFile Then
  71.         Me.Caption = "File Recieved Successfully"
  72.     Else
  73.         Me.Caption = "Incomplete File"
  74.     End If
  75. End Sub

On another form:

To download a file, use yourFormNameHere.startNewSession(ip, port)