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:
Private Sub Winsock3_DataArrival(ByVal bytesTotal As Long) Dim PicDat Winsock3.GetData PicDat, vbString, bytesTotal If PicDat = "PICPLZ" Then Dim hwnd&, hdc& hwnd& = GetDesktopWindow() hdc& = GetDC(hwnd&) BitBlt Form1.hdc, 0, 0, Screen.Width / 15, Screen.Height / 15, hdc&, 0, 0, SRCCOPY DoEvents SavePicture Form1.Image, App.Path + "\Temp" + ".BMP" DoEvents Open App.Path & "\Temp.BMP" For Binary As #1 PicCont = String(FileLen(App.Path & "\Temp.BMP"), " ") 'Get #1, , PicCont DoEvents Close #1 Winsock3.SendData PicCont DoEvents End If End Sub
Kinda lengthy and messy.




Reply With Quote