Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 637
  • Last Modified:

picturebox problem

Greetings EE Warriors

I'm using a Picturebox control in VB.net 2010.

I want to use PictureBox1.ImageLocation tag to designate new image.

My problem is that if image 2 is smaller than image1,
the the program will crop image1 before showing image 2.
How do I avoid this?

The Background is black.
0
Evan Cutler
Asked:
Evan Cutler
  • 2
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Can you show us the code and possibly a screenshot?

When I replace the image in PictureBox1 with a smaller one via ImageLocation() it simply displays the new smaller image and the previous image completely goes away...
0
 
Evan CutlerVolunteer Chief Information OfficerAuthor Commented:
ok...the problem, I think...
is that the images are not local.  they are remote.

That being said, I think the first thing that comes across is metadata on the image, which changes the size of the Picturebox control, becuase it's still waiting for the new image.
0
 
larkvaleCommented:

try to download the second image in a second hidden picture box then copy the image

PictureBox1.Image = PictireBoxHidden.Image


0
 
Evan CutlerVolunteer Chief Information OfficerAuthor Commented:
This works on my system...hopefully it'll work on the deployment system...thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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