Solved

VB.NET Application - Image Issue

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

914 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

17 Experts available now in Live!

Get 1:1 Help Now