Jump to content
Sign in to follow this  
creeping

$BS_ICON going all wierd on me

Recommended Posts

creeping

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?

Thanks

#include <GUIConstants.au3>

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


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

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

GUISetState(@SW_SHOW)

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

1.ico

Share this post


Link to post
Share on other sites
Psibernetic

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


[sup]Psibernetic[/sup]My Creations:X-HideSecuracy

Share this post


Link to post
Share on other sites
creeping

yes, odd. Must have something to do with the icon extractor I used.

Thanks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.