I want to sent a picture(smiley) with winsock and I do it like this
and the smiley is on my clipboard. the problem is: the other person only receives numbers. so how do I send a picture?VB Code:
winsock1.senddata clipboard.getdata
Printable View
I want to sent a picture(smiley) with winsock and I do it like this
and the smiley is on my clipboard. the problem is: the other person only receives numbers. so how do I send a picture?VB Code:
winsock1.senddata clipboard.getdata
You can't send the picture like that (as you already found out).Quote:
Originally Posted by Compact
You have to get the picture data, then send that data.
First you probably have to copy the picture from the clipboard to a temporary picturebox on your application.
Then you can use the GetBitmapData, and SetBitmapData functions wich I posted in this thread: http://www.vbforums.com/showthread.php?t=338162
Use GetBitmapData to read the bitmap data, so you can send it over winsock. And use SetBitmapData to set the bitmap data on a picturebox on the client/sender side.
You dont actually have to do that you can send the file using file transfer. Below is a link to guide which should help you...
File Transfer
Please note I have moved this to the network forum which is where this question should be ;)