Jump to content

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

Link to comment
Share on other sites

Have a look to this post ->

Maybe it is something you are searching for.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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

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...