Results 1 to 5 of 5

Thread: Copy from Clip Board Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    11

    Copy from Clip Board Error

    I am trying to copy a .jpeg file and pasting in VB.

    But running into the following error.

    "Cannot read from or write to the clipboard. (1-1604)"

    Any clue why...

    Thanks.

  2. #2
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Copy from Clip Board Error

    Lets say you're in Explorer and you see a jpeg file in a folder and you want to copy it to another folder. You select the file and press Ctrl+C to copy. Select another folder and press Ctrl+V to paste. If you look in your CLIPBRD.EXE all you will see is the file location, not an image of that file.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    11

    Re: Copy from Clip Board Error

    Thanks for your response.

    I am sorry but I do not understand how would that help me to fix the error.

  4. #4
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Copy from Clip Board Error

    How are you copying this jpeg?

    If it's an image on the clipboard then try,

    If Clipboard.GetFormat(vbCFBitmap) Then Picture1.Picture = Clipboard.GetData(vbCFBitmap)

  5. #5
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Copy from Clip Board Error

    Quote Originally Posted by Cern_VB_developer
    Thanks for your response.

    I am sorry but I do not understand how would that help me to fix the error.
    I'm just trying to draw you away from the misconception of the ClipBoard operation. Just because you copy a filename it doesn't copy the picture.

    Edgemeal has answered your question.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

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