• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 541
  • Last Modified:

how do I paste an image into a picturebox at runtime then progromaticly save the picture to file vb.net

how do I paste an image into a picturebox at runtime then progromaticly save the picture to file vb.net
0
Dov_B
Asked:
Dov_B
  • 4
  • 4
3 Solutions
 
Erick37Commented:
Do you mean paste from the clipboard?
0
 
Dov_BAuthor Commented:
yes and I have tried googling and  I did
PictureBox1.Image = Clipboard.GetImage
and it does not show anything pasted
0
 
CodeCruiserCommented:
Try this

if Clipboard.GetDataObject().GetDataPresent(DataFormats.Bitmap) Then
    pictureBox1.Image = Ctype(Clipboard.GetDataObject().GetData(DataFormats.Bitmap), Bitmap)
End If
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
Dov_BAuthor Commented:
nothing appears in my form or picturebox
0
 
CodeCruiserCommented:
What happens when you paste into Paint? Also step through the code to see if the condition is true or false
0
 
Dov_BAuthor Commented:
when I paste into paint.net it pastes
when I paste into paint it does not paste
when I paste into my vb app it does not paste

however doing what you told me made me realize that it wont copy images from my  myPictures folders directly but if I copy the picture into paint.net then copy it from paint.net it does go into my program

so I guess that leaves me with my last question now that I pasted it successfuly into my app how do I save it to file?
0
 
CodeCruiserCommented:
0
 
Dov_BAuthor Commented:
thanks
0
 
CodeCruiserCommented:
Glad to help :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now