Sign in to follow this  
Followers 0
Mr.Wizard

auto-sizing picture control

8 posts in this topic

It would be nice if there was a way to size a picture control to match the size of the image you put in it


I have a catapult. Give me all the money or I will fling an enormous rock at your head.

Share this post


Link to post
Share on other sites



Why can't you just use the same coordinate's that you used for the picture control for the picture itself? I don't really understnad what your saying, maybe tell me in a little more detail and I will help.


FootbaG

Share this post


Link to post
Share on other sites

I'm loading a picture and I don't know beforehand how big it is. I want the entire picture to show on the form, but if the picture control is smaller than the image it gets cropped.


I have a catapult. Give me all the money or I will fling an enormous rock at your head.

Share this post


Link to post
Share on other sites

I try to see if there is a solution with the current code.

Until now I didn't find anything. Perhaps Jon or Valik will be more successfull :)

Share this post


Link to post
Share on other sites

Of course stretching the control to fit the image is one solution, but stretching the image to fit the control is the other. It might be nice to have a stretch property for the picture control, with possible settings None/ControlToImage/ImageToControl


I have a catapult. Give me all the money or I will fling an enormous rock at your head.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Use this code by lazycat

<{POST_SNAPBACK}>

Whoah, That' a code.

I think I have find a solution if you define the control with a w=0 and h=0.

I will postit in my upload area :)

@cyberslug can you test it for non reg?

Edited by jpm

Share this post


Link to post
Share on other sites

@CyberSlug was it OK? :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0