Solved

VB.NET Application - Image Issue

Posted on 2012-03-09
3
220 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
  • 2
3 Comments
 
LVL 74

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now