Jump to content

XSkin.au3... Skin your GUI


Recommended Posts

  • Replies 503
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

** UPDATED ** Jan 22, 2009 Ver 1.4.1 XSkin.au3 * Added - XSkinConsole - Plug-in * Added - XSkinTrayMenu - Plug-in * Over 40 GUI Skins! - any size you want * Mouse-Over GUI Options

XSkin.au3 Demonstration Page Basics: 1. A Skinned GUI Only 2. A Skinned GUI and Button 3. A Skinned GUI, Button and XSkinMsgBox 4. A Skinned GUI, Button and XSkinInputBox 5. A

Posted Images

  • 2 weeks later...

read a lot of examples, but for now can't figure how start my skin,

nobody help me only to apply jpg over a button ? (to start learn)

Thank you,

m.

I Like you effort here in the Forums with the stuff you are trying to do. So, I put this together for you, it needs some refining on the letters...but....

Posted Image

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <_ControlHover.au3>

Global Const $WM_LBUTTONDOWN = 0x0201
Global $B[10], $Time, $Wait, $Voice = 0, $action = " Numbers"
Global $Info_Read = "Dave 555-1255|Cindy 447-4145|Ray 332-1988|Hotty 978-LOVE"
; read in data from a file?
Global $Key[10], $Symbol[10] = ["", "", "@", "%", "?", "!", ".", "+", "-", "="]
$Key[2] = "A,B,C,a,b,c"
$Key[3] = "D,E,F,d,e,f"
$Key[4] = "G,H,I,g,h,i"
$Key[5] = "J,K,L,j,k,l"
$Key[6] = "M,N,O,m,n,o"
$Key[7] = "P,Q,R,S,p,q,r,s"
$Key[8] = "T,U,V,t,u,v"
$Key[9] = "W,X,Y,Z,w,x,y,z"

$My_pic = @TempDir & "\Bckgrnd.jpg"
FileInstall(@ScriptDir & "\ipod.jpg", $My_pic)

$Main = GUICreate("T-90", 320, 480, -1, -1, $WS_POPUP)
$back = GUICtrlCreatePic($My_pic, 0, 0, 320, 480);, $WS_CLIPSIBLINGS)
GUICtrlSetState(-1, $GUI_DISABLE)
$exit = GUICtrlCreateLabel("", 295, 4, 20, 10)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$sound = GUICtrlCreateLabel("     OFF", 39, 3, 35, 12)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$save = GUICtrlCreateLabel("", 267, 29, 47, 25)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$cancel = GUICtrlCreateLabel("", 8, 29, 55, 25)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Edit1 = GUICtrlCreateInput("~Phone #", 18, 110, 285, 53)
GUICtrlSetFont(-1, 30)
$Edit2 = GUICtrlCreateList("A Phone List", 18, 175, 285, 72)
GUICtrlSetFont(-1, 24)
GUICtrlSetData(-1, $Info_Read, 1)
$B[1] = GUICtrlCreateLabel(" Clear", 0, 265, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[2] = GUICtrlCreateLabel(" @", 107, 265, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[3] = GUICtrlCreateLabel(" %", 214, 265, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[4] = GUICtrlCreateLabel(" ?", 0, 319, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[5] = GUICtrlCreateLabel(" !", 107, 319, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[6] = GUICtrlCreateLabel(" .", 214, 319, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[7] = GUICtrlCreateLabel(" +", 0, 373, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[8] = GUICtrlCreateLabel(" -", 107, 373, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[9] = GUICtrlCreateLabel(" =", 214, 373, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$star = GUICtrlCreateLabel(" Numbers", 0, 427, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$B[0] = GUICtrlCreateLabel(" Space", 107, 427, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$del = GUICtrlCreateLabel("", 214, 427, 105, 52)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$back = GUICtrlCreatePic($My_pic, 0, 0, 320, 480, $WS_CLIPSIBLINGS)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
_GuiRoundCorners($Main, 1, 1, 10, 10)
GUIRegisterMsg($WM_LBUTTONDOWN, "_WinMove")

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $exit, -3
            Exit
        Case $save, $cancel
            MsgBox(0X0, "Sorry", "This action is not currently available.... 8)    ")
        Case $star
            If GUICtrlRead($star) = " Numbers" Then
                $action = " Letters"
                GUICtrlSetData($star, $action)
                If $Voice Then Speak_Now("Letters")
            ElseIf GUICtrlRead($star) = " Letters" Then
                $action = " Symbols"
                GUICtrlSetData($star, $action)
                If $Voice Then Speak_Now("Symbols")
            Else
                $action = " Numbers"
                GUICtrlSetData($star, $action)
                If $Voice Then Speak_Now("Numbers")
            EndIf
        Case $del
            GUICtrlSetData($Edit1, StringTrimRight(GUICtrlRead($Edit1), 1))
            If $Voice Then Speak_Now("BackSpace")
            While GUIGetMsg() = $del
                GUICtrlSetData($Edit1, StringTrimRight(GUICtrlRead($Edit1), 1))
                If $Voice Then Speak_Now("BackSpace")
                Sleep(10)
            WEnd
        Case $sound
            If StringInStr(GUICtrlRead($sound), "ON") Then
                $Voice = 0
                GUICtrlSetData($sound, "     OFF")
            Else
                $Voice = 1
                GUICtrlSetData($sound, "     ON")
                If $Voice Then Speak_Now("Voice, On")
            EndIf
            
        Case Else
            For $x = 0 To 9
                If $msg = $B[$x] Then
                    Set_Text($x)
                    ;ExitLoop
                EndIf
            Next
    EndSwitch
    
WEnd

Func Set_Text($in)
    $Info = GUICtrlRead($Edit1)
    If StringInStr($Info, "~") Then $Info = ""
    If $action = " Numbers" Then
        If $Voice Then Speak_Now($in)
        Return GUICtrlSetData($Edit1, $Info & $in)
    EndIf
    If $in = "1" Then
        If $Voice Then Speak_Now("Clear")
        Return GUICtrlSetData($Edit1, "")
    EndIf
    If $in = "0" Then
        If $Voice Then Speak_Now("Space")
        Return GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & " ")
    EndIf
    If $action = " Symbols" Then
        If $Voice Then Speak_Now("Symbol")
        Return GUICtrlSetData($Edit1, $Info & $Symbol[$in])
    EndIf
    Local $lock = GUIGetCursorInfo($Main), $Split = StringSplit($Key[$in], ","), $cnt = 1
    GUICtrlSetData($Edit1, $Info & $Split[$cnt])
    If $Voice Then Speak_Now($Split[$cnt])
    While IsArray($lock) And $lock[4] == $B[$in]
        Sleep(100)
        $lock = GUIGetCursorInfo($Main)
        If IsArray($lock) And $lock[2] = "1" Then
            $cnt += 1
            $Info = StringTrimRight(GUICtrlRead($Edit1), 1)
            GUICtrlSetData($Edit1, $Info & $Split[$cnt])
            If $Voice Then Speak_Now($Split[$cnt])
            If $cnt >= $Split[0] Then $cnt = 0
            Sleep(100)
        EndIf
        Sleep(100)
    WEnd
EndFunc   ;==>Set_Text

Func Speak_Now($Now_text)
    Local $oi_speech = ObjCreate("SAPI.SpVoice")
    If IsObj($oi_speech) Then $oi_speech.Speak($Now_text)
    $oi_speech = ""
EndFunc   ;==>Speak_Now

Func _WinMove($HWnd, $Command, $wParam, $lParam)
    If BitAND(WinGetState($HWnd), 32) Then Return $GUI_RUNDEFMSG
    DllCall("user32.dll", "long", "SendMessage", "hwnd", $HWnd, "int", $WM_SYSCOMMAND, "int", 0xF009, "int", 0)
EndFunc   ;==>_WinMove

Func _GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3) ; thanks gafrost
    Dim $XS_pos, $XS_ret, $XS_ret2
    $XS_pos = WinGetPos($h_win)
    $XS_ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $XS_pos[2], "long", $XS_pos[3], "long", $i_x3, "long", $i_y3)
    If $XS_ret[0] Then
        $XS_ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $XS_ret[0], "int", 1)
    EndIf
EndFunc   ;==>_GuiRoundCorners

Hope that helps!!!

8)

NEWHeader1.png

Link to post
Share on other sites

Valuater thank you again,

yes i notice the voice, noe i'm studing to finf script where use

can select from windows installed sapi voices.

from what i've read default system voice is taken from script to speak,

but un Vista can't works (?). If only user can choise...

Also study your script to implement 'my' T9 vocabularies work,

Very elegant script, thank you!

m.

Link to post
Share on other sites
  • 4 weeks later...

Thanks, nice work! :)

Have you considered something that could automatically convert an existing au3 to xskin.

Or an au3 that's already xskined to a new skin?

Now that would kick a** :)

Kenny

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to post
Share on other sites

I think it would be very difficult to make one for XSkin, however JScript had made one for EzSkin and when he left he had all of his posts deleted.

I am thinking of making one for EzSkin, but not to the level that JScript did....

Better than that, there were quit a few who had downloaded the EzSkin coverter from JScript and might still have a working copy that they can post it

8)

NEWHeader1.png

Link to post
Share on other sites

hmm wish I had a copy for you.

But in any case, again very nice work :)

Kenny

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to post
Share on other sites
  • 3 weeks later...

Thanks Ken...

thx u very much Valuater! Honesty, i used Xskin to skin my GUI but i don't know how to skin the button with Xskin so had mixed Ez + X, but now i can skin my gui with only Xskin. Once again thanks for your helps!

That is what I thoought you were doing...

Your Welcome ... LeHuynhNam

8)

NEWHeader1.png

Link to post
Share on other sites

and i have more some question!

i have this code:

#include <GuiConstants.au3>
Opt("GUIResizeMode", $GUI_DOCKALL)
$Gui = GuiCreate("Test", 300, 200)
$Expand_Button = GUICtrlCreateButton("Expand", 20, 80, 80)
$Button1 = GUICtrlCreateButton("Some Button", 20, 240, 80)
$Button2 = GUICtrlCreateButton("Other Button", 120, 240, 80)
$Input = GUICtrlCreateInput("Some Input", 20, 210, 200, 20)

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case -3
            Exit
        Case $Expand_Button
            Local $Height, $ButtonText
            $GuiPos = WinGetPos($Gui)
            If $GuiPos[3] < 320 Then
                $Height = 320
                $ButtonText = "Hide"
            Else
                $Height = 225
                $ButtonText = "Expand"
            EndIf
            GUICtrlSetData($Expand_Button, $ButtonText)
            WinMove($Gui, "", $GuiPos[0], $GuiPos[1], $GuiPos[2], $Height)
    EndSwitch
WEnd

and i want to skin it! but when i click the Expand button the gui change with fragmentative skin! Can u update new function to resolve this problem! i mean i can use winmove with my gui without changing the skin...

sorry 4 my bad english! :)

4m848p10.gif 

Link to post
Share on other sites

i've tried it with ezskin and Xskin but it still no tooltip!

This works for XSKIN... You told me you are now using XSkin in previous posts

( not tested on EzSkin)

#include <XSkin.au3>

; folder of skin
$Skin_Folder = @ScriptDir & "\Skins\Black-Yellow"

$XSkinGui = XSkinGUICreate( "My GUI", 400, 450, $Skin_Folder)

$button_1 = XSkinButton("Button 1", 145, 100, 100, 35, "Hello")

if IsArray($button_1) Then MsgBox(0,0,0)

; use this....$CtrlButton[ BUTTON NAME HERE][0]
GUICtrlSetTip($CtrlButton[$button_1][0] , "This is a Control Tip   ") 

GUISetState()

While 1
   
    MouseOver()
   
    Sleep(10)
WEnd

Func Hello()
    MsgBox(64, "XSkin", "Test Button 1", 3)
EndFunc

BTW... neither EzSkin nor XSkin can have the GUI change size, it must be re-created

8)

Edited by Valuater

NEWHeader1.png

Link to post
Share on other sites

thx valuater! i use your code to set tip for my button which created by _HoverButton

GUICtrlSetTip($CtrlButton[$button_1][0] , "This is a Control Tip   ")

and it appeared error

C:\Documents and Settings\ANHNAM\My Documents\Compressed\XSkin_Fully_Loaded\a.au3 (17) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
GUICtrlSetTip($CtrlButton[$button_1][0] , "This is a Control Tip   ")
GUICtrlSetTip(^ ERROR

what should i do?

4m848p10.gif 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...