Jump to content

XSkin.au3... Skin your GUI


Recommended Posts

what i was meaning was that this works when the GUISetState() if directly after the XSkinGUICreate line.

You can resize the window and the controls are ok (normal controls anyhow, but im sure i could sort it out for the skinned controls to)

#include <XSkinx.au3>
$Skin_loc = "C:\PROGRAMDATA\MY Docs\Auto It\Skins\Defacto"
$XSkinGui = XSkinGUICreate("My GUI", 400, 450, 100, 100, $Skin_loc, 1, 0)
GUISetState()
$XIcon = XSkinIcon($XSkinGui, 3);
GUICtrlCreateButton("Normal Button",20,100,100,35);im useing normal controls after creating the GUI
$button_1 = XSkinButton("Skinned Button", 145, 100, 100, 35, "Hello");test a skinned button

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $XIcon[1]
            Exit
        Case $XIcon[2]
            GUISetState(@SW_MINIMIZE, $XSkinGui)
    EndSwitch
    MouseOver() ;makes the button flash on mouseover
    Sleep(10)
WEnd
Exit
Func Hello()
    MsgBox(64, "XSkin", "Test Button 1", 3)
EndFunc   ;==>Hello

But if i try to put all the controls on before showing the GUI the resizing dont work, it messes up the ctrl's or makes them disappear all together.

#include <XSkinx.au3>
$Skin_loc = "C:\PROGRAMDATA\MY Docs\Auto It\Skins\Defacto"
$XSkinGui = XSkinGUICreate("My GUI", 400, 450, 100, 100, $Skin_loc, 1, 0)
$XIcon = XSkinIcon($XSkinGui, 3);
GUICtrlCreateButton("Normal Button",20,100,100,35);im useing normal controls after creating the GUI
$button_1 = XSkinButton("Skinned Button", 145, 100, 100, 35, "Hello");test a skinned button
GUISetState();GUIsetstate test placed after ctrl's added to GUI

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $XIcon[1]
            Exit
        Case $XIcon[2]
            GUISetState(@SW_MINIMIZE, $XSkinGui)
    EndSwitch
    MouseOver() ;makes the button flash on mouseover
    Sleep(10)
WEnd
Exit
Func Hello()
    MsgBox(64, "XSkin", "Test Button 1", 3)
EndFunc   ;==>Hello

btw, thx for the response Valuater :mellow:

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to post
Share on other sites
  • 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

How to Hide Xskin Icon in toolbar..

I use WinGetHandle(AutoItWinGetTitle())) But not working..

#Include <XSkin.au3>

; folder of skin
$Skin_Folder = @ScriptDir & "\Skins\Black-Yellow"
$XSkinGui = XSkinGUICreate( "My GUI", 400, 450, $Skin_Folder, WinGetHandle(AutoItWinGetTitle()))
$XIcon = XSkinIcon( $XSkinGui, 2 )

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = $XIcon[1] Then Exit
    If $msg = $XIcon[2] Then GUISetState(@SW_MINIMIZE)
    ;If $msg = $XIcon[3] Then MsgBox(0, 0, "Help", 1)
WEnd

Thank`s To Valuater.. :mellow:

Link to post
Share on other sites

Just remove it.... like this..

#Include <XSkin.au3>

; folder of skin
$Skin_Folder = @ScriptDir & "\Skins\Black-Yellow"
$XSkinGui = XSkinGUICreate( "My GUI", 400, 450, $Skin_Folder)
;$XIcon = XSkinIcon( $XSkinGui, 2 )

GUISetState()

While 1
    $msg = GUIGetMsg() ; used to slow CPU
    ;If $msg = $XIcon[1] Then Exit
    ;If $msg = $XIcon[2] Then GUISetState(@SW_MINIMIZE)
    ;If $msg = $XIcon[3] Then MsgBox(0, 0, "Help", 1)
WEnd

8)

Edited by Valuater

NEWHeader1.png

Link to post
Share on other sites
  • 1 month later...

FYI,

post #364 contains garbage in the XSkinTray.au3 code box.

Post #367 contains garbage in the code box for XSkinConsole.au3 (around the Sleep(5000) line).

Also, there's no link to download XSkinConsole.au3

Edit: I see now that many of the source example code boxes contain garbage, and

most of the includes cannot be downloaded (or found).

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

Wow, Awesome Project!!!!

I have been playing with this for about 6 hours now, and loads of fun!!

However I have one problem, I hope you could explain for me.

I created my own graphic, which looks great, however I want to use the buttons from example 15b, and I don't see how to add them.

I have tried placing them in a Buttons Folder, and placed that folder both in the Skins folder, and the script folder still to no avail. Is there a command to include them?

Edit: NVM, figured it out when I found the _HoverButton Topic. I didn't realize this was 2 separate projects. Both of which are great tools. Greate Job Valuater, and everyone else that played a part!

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

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

This is absolutely A-M-A-Z-I-N-G !!

I would like it to be included with the next version of autoit (well maybe not files insluded but at least download link in the help files...)

Thanks Valuater, you just added value to AutoIt ;)

Thanks ALTIN, your words are appreciated... and Realm

Valuater

8)

Edited by Valuater

NEWHeader1.png

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

How can i use @error function for XSkinInputBox, cos this doesn't work:

XSkinInputBox("Hello world", "Hello")

If @error Then
;how to make it to do nothing on error? In my script i am adding something to the listview
;I thought about something like continue loop, but for statements
Endif
Edited by zwierzak
Link to post
Share on other sites

I believe that your code above will work for "Do Nothing"

If @error Then
; Do Nothing
EndIf

or to code a return...

$Return = XSkinInputBox("Hello world", "Hello")

If $Return = 1 Or $Return = 2 Or $Return = "" Then
    ; do nothing
ElseIf StringLen($Return) > 3 Then ; set minium string length here
    GUICtrlSetData("bla..", "Bla..")
Else
    MsgBox(0, "Error", "We have a real error here", 5)
EndIf

8)

Edited by Valuater

NEWHeader1.png

Link to post
Share on other sites
  • 1 month later...
  • 6 months later...
  • 2 months later...
  • 1 month later...
  • 1 month later...

Hi Valuater,

Happy B-day btw :graduated:..I wanted to know if its possible to hide the taskbar icon when using Xskin to create a Gui....

Thanks

Thanks for the Bday wish...8)

Hide from Taskbar

;$XS_gui[$XS_TMA] = GUICreate($XS_guiTitle, $XS_width, $XS_height, -1, -1, $guiHeader2, -1, WinGetHandle(AutoItWinGetTitle())) ; hide from taskbar

Original

;$XS_gui[$XS_TMA] = GUICreate($XS_guiTitle, $XS_width, $XS_height, -1, -1, $guiHeader2) ; Original

This will do the trick!!!

8)

NEWHeader1.png

Link to post
Share on other sites

Thanks for the Bday wish...8)

Hide from Taskbar

;$XS_gui[$XS_TMA] = GUICreate($XS_guiTitle, $XS_width, $XS_height, -1, -1, $guiHeader2, -1, WinGetHandle(AutoItWinGetTitle())) ; hide from taskbar

Original

;$XS_gui[$XS_TMA] = GUICreate($XS_guiTitle, $XS_width, $XS_height, -1, -1, $guiHeader2) ; Original

This will do the trick!!!

8)

Worked great but what happens if i need it for when i want to hide the taskbar for only 1 gui. Let me explain. My program has 2 GUIs, one version is what i called Full GUI mode (which needs taskbar icon) and Compact mode GUI (that i dont want a taskbar icon) switching from one to the other is done via my options GUI which will call the appropriate GUI once its closed. So basically when compact mode is active = no Taskbar and Normal GUI active = Taskbar.

Also another quick question, Everytime i go into my option GUI i have to click on any active button twice before i get a response. Once i do then all active buttons in my option gui will react normally even if i close and re-open the options GUI. This only happens the first time i go into the options GUI

Edited by Saitoh183
Link to post
Share on other sites

Also another quick question, Everytime i go into my option GUI i have to click on any active button twice before i get a response. Once i do then all active buttons in my option gui will react normally even if i close and re-open the options GUI. This only happens the first time i go into the options GUI

I think this has to do with __ButtonhoverTag.au3 so i guess i can post over there

Link to post
Share on other sites

1) Ad to the Dim Statments

Dim $X_Parent

2) Change the Function call to this

Func XSkinGUICreate($XS_guiTitle, $XS_width, $XS_height, $Skin_Folder, $guiHeader = 1, $guiCorners = 25, $X_Parent = "") ; you can see where I added the $X_Parent

3) Change the GUICreate() line to this

If $X_Parent Then

$XS_gui[$XS_TMA] = GUICreate($XS_guiTitle, $XS_width, $XS_height, -1, -1, $guiHeader2, Default, WinGetHandle(AutoItWinGetTitle())) ; hide from taskbar

Else

$XS_gui[$XS_TMA] = GUICreate($XS_guiTitle, $XS_width, $XS_height, -1, -1, $guiHeader2) ; Original

EndIf

4) To create the First GUI with a Taskbar use...

XSkinGUICreate($XS_guiTitle, $XS_width, $XS_height, $Skin_Folder, $guiHeader = 1, $guiCorners = 25, $X_Parent = "")

5) To create the Second Hidden Task use...

XSkinGUICreate($XS_guiTitle, $XS_width, $XS_height, $Skin_Folder, $guiHeader = 1, $guiCorners = 25, $X_Parent = 1)

8)

This is not completely tested but... it will work

Edited by Valuater

NEWHeader1.png

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