Jump to content
Sign in to follow this  
computergroove

GUICtrlCreatePic auto re-size option?

Recommended Posts

I am using GUICreate to make a small window on the screen and then using GUICtrlCreatePic to add a picture inside the window. What is the correct flag to get the picture to re-size to the size of the window?

GUICreate("123", $width, $height, @DesktopWidth - $hPosition, $vPosition, $WS_POPUP, $WS_EX_TOPMOST)
$Button1 = GUICtrlCreatePic("..\GUI\123.jpg", -1, -1)

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

I had already seen the above post and it wasn't what I was looking for. I did discover something though. I added some values to the code from this:

$Button1 = GUICtrlCreatePic("..\GUI\123.jpg", -1, -1)

to this:

$Button1 = GUICtrlCreatePic("..\GUI\123.jpg", -1, -1, $width, $height)

and that re-sized the picture to fit into the frame. It broke something else though.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...