Hola amigos, ya que no se puede ver la web cam de msn, toy haciendo un programa...
pero no se como se envian imagenes de un picture box a otro :S
aqui les dejo el codigo de lo que llevo echo de mi cliente y servidor:
Cliente:
Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hndw As Long) As Boolean
Private Const CONNECT As Long = 1034
Private Const DISCONNECT As Long = 1035
Private Const GET_FRAME As Long = 1084
Private Const COPY As Long = 1054
Private hWndCap As Long
Private Sub Form_Load()
Timer1.Interval = 1
hWndCap = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 160, 120, Me.hwnd, 0)
DoEvents
SendMessage hWndCap, CONNECT, 0, 0
Timer1.Enabled = True
Winsock1.RemoteHost = txtip.Text
End Sub
Private Sub Form_Unload(Cancel As Integer)
DestroyWindow hWndCap
End Sub
Private Sub Timer1_Timer()
SendMessage hWndCap, GET_FRAME, 0, 0
SendMessage hWndCap, COPY, 0, 0
Picture1.Picture = Clipboard.GetData
Clipboard.Clear
End Sub
Servidor:
Private Sub Command1_Click()
Winsock1.Listen
End Sub
Private Sub Command2_Click()
Winsock1.Close
End Sub
Private Sub Command3_Click()
Call SavePicture(Picture1.Image, "\image.bmp")
End Sub
Private Sub Form_Load()
End Sub
Private Sub Text1_Change()
List1.AddItem Text1.Text
End Sub
Private Sub Winsock1_Connect()
Text1.Text = Winsock1.RemoteHost
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If w2.State <> sckClosed Then _
w2.Close
w2.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim Imagenes As String
Winsock1.GetData Imagenes
Picture1.Picture Data
End Sub
Como ven en el servidor aun no e echo el SendData
y en la linea "Picture1.Picture Data" del servidor me da error :S
Bueno desde ya Gracias
Salu2
Ranslsad