Solved

VB.NET Application - Image Issue

Posted on 2012-03-09
3
227 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 500 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

696 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