MikeP Posted May 11, 2008 Share Posted May 11, 2008 (edited) Hi.. am I dumb? Is it even possible to skin a button with a picture ? I can't get this to work... anyone could check what's wrong in this please : #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) GUICreate("", 300, 300) GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "quit") $bttn = GUICtrlCreateButton("damn", 10, 10, 60, 40) GUICtrlSetImage($bttn, "bttn.png") While 1 Sleep(200) WEnd Func quit() Exit EndFunc Thanks ! (I tried with png..gif..jpg..bmp.. I tried putting the full path.. no result ) Edited May 11, 2008 by MikeP Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 11, 2008 Moderators Share Posted May 11, 2008 (edited) Icon or Bitmap. The style must be set to $BS_ICON or $BS_BITMAP respectively. Edit: You may want to look at XSkin in the example forum for "skinning" options. Edited May 11, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted May 11, 2008 Share Posted May 11, 2008 Maybe...#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) GUICreate("", 300, 300) GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "quit") $bttn = GUICtrlCreatePic("C:\Location to picture.jpg", 10, 10, 60, 40) ;GUICtrlSetImage($bttn, "bttn.png"); use this to change the picture While 1 Sleep(200) WEnd Func quit() Exit EndFunc ;==>quit... and for a set of buttons with skinshttp://www.autoitscript.com/forum/index.ph...st&p=3073808) Link to comment Share on other sites More sharing options...
MikeP Posted May 11, 2008 Author Share Posted May 11, 2008 (edited) Yeah ..thanks I just found it too Anyway that's not so bad I asked you since now I'll have a look at XSkin Ty Valuater.. I guess I'll do that since putting a bmp on a button like this doesn't give a good result..I'll rather use a picture as a button good idea Edited May 11, 2008 by MikeP Link to comment Share on other sites More sharing options...
theguy0000 Posted May 11, 2008 Share Posted May 11, 2008 (edited) change $bttn = GUICtrlCreateButton("damn", 10, 10, 60, 40) to $bttn = GUICtrlCreateButton("damn", 10, 10, 60, 40, $BS_BITMAP) then use a bmp image. If using the beta version of AutoIt, #include <ButtonConstants.au3> edit: lol way too slow Edited May 11, 2008 by theguy0000 The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Valuater Posted May 11, 2008 Share Posted May 11, 2008 Yeah ..thanks I just found it tooAnyway that's not so bad I asked you since now I'll have a look at XSkin Ty Valuater.. I guess I'll do that since putting a bmp on a button like this doesn't give a good result..I'll rather use a picture as a button good ideaBe sure to see EzSkin too!( the link above )8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now