Solved

VB.NET Application - Image Issue

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Make the most of your online learning experience.
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 …
Starting up a Project

691 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