Título: Enviar una imagen por winsock Publicado por: Natzui en 25 Abril 2008, 20:33 pm Hola soy nuevo en el foro y quisiera saber si me pueden ayudar.
Mi problema es que quiero enviar una captura de pantalla por un winsock, pero me sale el error 521 Can't open clipboard. Este es el codigo: Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Function Capturar() Clipboard.Clear keybd_event 44, 0, 0, 0 keybd_event 44, 0, KEYEVENTF_KEYUP, 0 Do While Clipboard.GetData = False DoEvents Loop pant.Picture = Clipboard.GetData Clipboard.Clear End Function Private Sub capt_Timer() If ws.State = sckConnected Then Capturar ws.SendData pant.Picture End If End Sub Private Sub Form_Load() ws.Listen End Sub Private Sub ws_ConnectionRequest(ByVal requestID As Long) ws.Close ws.Accept requestID End Sub Private Sub ws_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) ws.Close ws.Listen End Sub |