problem with picture box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello Everybody

how are you everybody ?... i have a problem with picture box, i want copy a image from the clipboard, and me can to copy a image if the image is a bitmap(extension bmp), but if the image is the other type(example, jpg, jpeg, gif, etc) i don't can, i have a error. i'm new in VB.NET, i'm a student and want to learn VB.NET, please an example or suggestions. thanks for your time and help

Att.
Jhonatas M. Rodrígue
 
* "=?Utf-8?B?SmhvbmF0YXMgTS4gUm9kcsOtZ3Vleg==?=" <[email protected]> scripsit:
[...]

Please tell your newsreader application to break lines after 76
characters, your message was "unreadable".
 
Jhonatas,
Here is a link to a webpage that has a good example on how to do this
correctly. It sounds to me like you just have not set the filter correctly
for the image type you are trying to copy to the clipboard.
james

http://www.visual-basic-data-mining.net/Forum/showpost.aspx?PostID=704



Jhonatas M. Rodríguez said:
Hello Everybody:


how are you everybody ?... i have a problem with picture box, i want
copy a image from the clipboard, and me can to copy a image if the image is
a bitmap(extension bmp), but if the image is the other type(example, jpg,
jpeg, gif, etc) i don't can, i have a error. i'm new in VB.NET, i'm a
student and want to learn VB.NET, please an example or suggestions. thanks
for your time and help.
 
Hi,

Try this.
Copy image to clipboard
Clipboard.SetDataObject(Image.FromFile("C:\test.jpg"))



Retrieve from clipboard

If iData.GetDataPresent(DataFormats.Dib) Then

Dim bm As Bitmap = iData.GetData(DataFormats.Bitmap)

PictureBox1.Image = bm

End If

Ken
 
Hello Everybody
Hey Herfried K. Wagner, here the message again

how are you everybody ?... i have a problem with picture box,
i want copy a image from the clipboard, and me can to copy a
image if the image is a bitmap(extension bmp), but if the image
is the other type(example, jpg, jpeg, gif, etc) i don't can, i have
a error. i'm new in VB.NET, i'm a student and want to learn VB.NET,
please an example or suggestions. thanks for your time and help

Att
Jhonatas M. Rodríguez
 
Back
Top