Jump to content

Changing Button Graphics


Recommended Posts

How would I do this? I made an icon set that would look very nice, But I don't know how I would use them after looking through the AutoIt commands =/

The buttons I'm most concerned with are the 3 at the top right of most any GUI (Close, [Maximize, Restore], Minimize)

Any help is much appreciated!

Slai~

Link to comment
Share on other sites

i dont understand that question but i think i know what you mean...

in stead of this:

GuiCreate("MyGUI", 392, 323,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))oÝ÷ Úf¤z+ZºÚ"µÍÝZPÜX]J ][ÝÓ^QÕRI][ÝËÎLÌËLKLJ

just get rid of the bitOR

i think thats what your asking

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Link to comment
Share on other sites

Not exactly, I want to change the buttons for closing, minimizing, and maximizing a gui. I made custom ones, I just don't know how to change them =(

Search for XSkin?
Link to comment
Share on other sites

Ok, got them changed, new question :)

When I change the buttons I get these nasty looking borders (because they are made from buttons), I will link a picture to help explain better.

Posted Image

So my question is, how do you remove them (if you can)?

Link to comment
Share on other sites

It Definitely Works.....

Posted Image

Posted Image

heres the code that did it...

#include <XSkin.au3>

$Skin_Folder = @ScriptDir & "\Skins\Universal"

$Icon_Folder = @ScriptDir & "\Skins\Default"

$XSkinGui = XSkinGUICreate( "My GUI", 300, 120, $Skin_Folder)
$XIcon = XSkinIcon($XSkinGui, 2)

$Button = GUICtrlCreateButton("Take Focus", 20, 40, 100, 30)
GUICtrlSetState( $Button, $GUI_FOCUS) ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This line

GUISetState()


While 1

    $msg = GUIGetMsg()
   
    If $msg = $XIcon[1] Then Exit
    If $msg = $XIcon[2] Then GUISetState(@SW_MINIMIZE)
   
WEnd

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

I mean to do it with the XSkinIcon command. I got the labels to recognize clicks, but can't get the image to display on it =/

For $XS_b = 1 To UBound($XS_winB) - 1
   $XS_winB[$XS_b] = GUICtrlCreateLabel("", ($XSIPos[2] - $XadjLt) - $XS_IPos1, $XadjDn, $XS_Isize, $XS_Isize, BitOR($SS_BITMAP, $SS_NOTIFY))
   Local $iret = GUICtrlSetImage($XS_winB[$XS_b], $Icon_Folder & $XS_Istyle & $XS_b & ".bmp")
   If $XS_b = 3 And Not FileExists($Icon_Folder & $XS_Istyle & $XS_b & ".bmp") Then GUICtrlSetImage($XS_winB[$XS_b], $Icon_Folder & "Standard3.bmp")
   $XS_IPos1 += $XS_Isize + 2
Next

That's what I have, images won't display.

Edited by Slaiochi
Link to comment
Share on other sites

I mean to do it with the XSkinIcon command. I got the labels to recognize clicks, but can't get the image to display on it =/

For $XS_b = 1 To UBound($XS_winB) - 1
    $XS_winB[$XS_b] = GUICtrlCreateLabel("", ($XSIPos[2] - $XadjLt) - $XS_IPos1, $XadjDn, $XS_Isize, $XS_Isize, BitOR($SS_BITMAP, $SS_NOTIFY))
    Local $iret = GUICtrlSetImage($XS_winB[$XS_b], $Icon_Folder & $XS_Istyle & $XS_b & ".bmp")
    If $XS_b = 3 And Not FileExists($Icon_Folder & $XS_Istyle & $XS_b & ".bmp") Then GUICtrlSetImage($XS_winB[$XS_b], $Icon_Folder & "Standard3.bmp")
    $XS_IPos1 += $XS_Isize + 2
 Next

That's what I have, images won't display.

Labels are not meant to work like that...try

GuiCtrlCreatePic()

8)

NEWHeader1.png

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