I have a huge amount of code and i found the line that is wrong. I am taking a screenshot, saving it to a temporary file (*.bmp) and opening it up for transfer via winsock. Could someone read over my code and tell me what is wrong? By the way my error is:

Variable uses an automtion type not supported in VB.

The error line is changed to a comment!
VB Code:
  1. Private Sub Winsock3_DataArrival(ByVal bytesTotal As Long)
  2. Dim PicDat
  3. Winsock3.GetData PicDat, vbString, bytesTotal
  4.  
  5. If PicDat = "PICPLZ" Then
  6.      Dim hwnd&, hdc&
  7.      hwnd& = GetDesktopWindow()
  8.      hdc& = GetDC(hwnd&)
  9.      BitBlt Form1.hdc, 0, 0, Screen.Width / 15, Screen.Height / 15, hdc&, 0, 0, SRCCOPY
  10.      DoEvents
  11.      
  12.      SavePicture Form1.Image, App.Path + "\Temp" + ".BMP"
  13.  
  14.      DoEvents
  15.      Open App.Path & "\Temp.BMP" For Binary As #1
  16.      
  17.      PicCont = String(FileLen(App.Path & "\Temp.BMP"), " ")
  18.      'Get #1, , PicCont
  19.      DoEvents
  20.      Close #1
  21.      Winsock3.SendData PicCont
  22.      DoEvents
  23. End If
  24.  
  25. End Sub

Kinda lengthy and messy.