come faccio a ricevere un immagine nel lato server ???
Private Declare Sub keybd_event Lib "user32" _
(ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Public Function ImmagineSchermo(Optional ActiveWindow As Boolean) As Picture
Dim Picture As StdPicture
Set Picture = Clipboard.GetData(vbCFBitmap)
If ActiveWindow Then
keybd_event vbKeyMenu, 0, 0, 0
End If
keybd_event vbKeySnapshot, 0, 0, 0
DoEvents
keybd_event vbKeySnapshot, 0, KEYEVENTF_KEYUP, 0
If ActiveWindow Then
keybd_event vbKeyMenu, 0, KEYEVENTF_KEYUP, 0
End If
Set ImmagineSchermo = Clipboard.GetData(vbCFBitmap)
Clipboard.SetData Picture, vbCFBitmap
End Function
Private Sub Command1_Click()
Dim immagine() As Byte
Open "C:\Users\Francesco\Desktop\a.bmp" For Binary As #1
ReDim immagine(0 To LOF(1) - 1)
Get #1, , immagine
Close #1
Winsock1.SendData immagine
End Sub
Private Sub Command2_Click()
Winsock1.Connect text2.text, "2000"
End Sub
Private Sub Form_Load()
Set Picture1.Picture = ImmagineSchermo
SavePicture Picture1.Picture, "C:\Users\Francesco\Desktop\a.bmp"
End Sub
|