Jump to content

Pic control


 Share

Recommended Posts

I want my picture to fit into a certain area

1) if I set the height and width of my pic control the picture still extends outside the borders.

2) Really what I would like is the ability to have the picture automatically resize to fit whatever size I make the control.

I read a couple of posts on it so I see other people are having issues but I didn't see any replys so sorry if it has already been discussed

Any thoughts?

red

Link to comment
Share on other sites

I use next trick for now:

$picture = GUISetControl("pic", "picname.jpg", 20, 20)
                GUISetControl($picture, "picname.jpg", 20, 20, 100, 100)

Not very beautifull, but working.

If you need to keep aspect ratio of image and you don't know what aspect of image is, you can try my UDF for get image size and do needed calculations.

Edited by Kot
Link to comment
Share on other sites

Alright I figured out to not use guiwrite but to use guisetcontrol like Kot showed above, but still I think at least the initial setting could be considered a bug.

<{POST_SNAPBACK}>

What is thereslt if the initial is
$picture = GUISetControl("pic", "picname.jpg", 20, 20,100,100)
Link to comment
Share on other sites

You get the image, but it doesn't fit the width and height you specify. It stays the same with and height of the original image size.

<{POST_SNAPBACK}>

can you attach the jpg your are using I will have a look why the first size does not do the job? :ph34r:
Link to comment
Share on other sites

Here is the image

red

<{POST_SNAPBACK}>

Thanks I got the error (?) the pic creation was a cut and paste of Splash code and it is not working.

I change the way the sizing is done by a MoveWindow and now it works

I submit the correction to Jon :ph34r:

//  SetWindowPos(A,HWND_TOPMOST,X,Y,W,H,SWP_DRAWFRAME);
    MoveWindow(A,X,Y,W,H,TRUE);

Just a support question how do you attach Thumbnails?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...