Jump to content

$BS_ICON going all wierd on me


 Share

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?

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

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

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

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