Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.NET Application - Image Issue

Posted on 2012-03-09
3
Medium Priority
?
232 Views
Last Modified: 2012-03-25
Hello,

I have a basic VB.net app, single form.  I'd like to have an image on the top of the page.  My question/issue is, I'd like to be able to hot-swap said image in that space, by simply changing the corresponding .jpeg file in the build's output.  

Right now I have accomplished this, and it works fine, but the dimensions of the image are hard coded to the maximum size of this image on the form.  I defined an image space of
324x84 pixels.  Whatever .jpg image I drop in the directory stretches to those maximum dimensions.  I would ideally like the image to center, and observe the maximum height, but leave width alone so the image doesn't look distorted.

I've tried changing SizeMode to  "Normal", had it on "StretchImage", and that worked, except the image is now left aligned.  I'd like the image to sit in the center.  Any thoughts or ideas?

Thanks for the help.
0
Comment
Question by:compsol1993
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 37703190
Have you tried PictureBoxSizeMode.Zoom?
0
 

Author Comment

by:compsol1993
ID: 37703291
That worked perfectly.  Not sure why I didn't try that already.

One more question, I have a corresponding .rdlc report, pretty much the same layout as the form.  Any thoughts on how to achieve the same thing in an .rdlc

Thanks,
0
 

Author Closing Comment

by:compsol1993
ID: 37763756
Thanks again
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question