Jump to content
Sign in to follow this  

$BS_ICON going all wierd on me

Recommended Posts

My icon is 16x16, so why do I only get a small square with this code?

If I set width and height to 60 in GUICtrlCreateButton then its huge, but it looks right.

Thought if I used an 16x16 icon with width and height at 16 in GUICtrlCreateButton it would fit good...nope

Any ideas?


#include <GUIConstants.au3>

#region global variables
;icon path
$sIconPath = @ScriptDir & '\icons\'

#region create GUI
$GUI = GUICreate('')

GUICtrlCreateButton('', 1, 1, 16, 16, $BS_ICON)
GUICtrlSetImage(-1, $sIconPath & '1.ico')


While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop


Share this post

Link to post
Share on other sites

well it would seem it is a 16x16 icon from the properties, but when I open the icon with an editor, the image size is 48x48...but when I used those button sizes, it was far too large...so I subtracted 16 from 48...u end up with 32... this icon my friend is a 32x32 icon try the sizes ... 32width and 32height... works perfect ... hope I helped

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  

  • Create New...