Results 1 to 3 of 3

Thread: [winsock] send smiley

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2005
    Posts
    26

    [winsock] send smiley

    I want to sent a picture(smiley) with winsock and I do it like this
    VB Code:
    1. winsock1.senddata clipboard.getdata
    and the smiley is on my clipboard. the problem is: the other person only receives numbers. so how do I send a picture?

  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: [winsock] send smiley

    Quote Originally Posted by Compact
    I want to sent a picture(smiley) with winsock and I do it like this
    VB Code:
    1. winsock1.senddata clipboard.getdata
    and the smiley is on my clipboard. the problem is: the other person only receives numbers. so how do I send a picture?
    You can't send the picture like that (as you already found out).
    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.

  3. #3
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: [winsock] send smiley

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width