Jump to content
Sign in to follow this  
Valuater

XSkin.au3... Skin your GUI

Recommended Posts

Got this message, see attached file.

ok... the problem is here... I thought this was for win xp only.. i will fix that on the next release

Func XSkinProgress($Pleft, $Ptop, $Pwidth, $Pheight)
    If StringInStr(@OSTYPE, "WIN32_NT") Then
        $n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties");, "int", 0)
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
    EndIf
    $PControl = GUICtrlCreateProgress($Pleft, $Ptop, $Pwidth, $Pheight)
    GUICtrlSetBkColor($PControl, $over_color)
    GUICtrlSetColor($PControl, $btn_color)
    GUICtrlSetLimit(-1,100,0)
    If StringInStr(@OSTYPE, "WIN32_NT") Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $n[0])
    EndIf
    Return $PControl
EndFunc   ;==>XSkinProgress
oÝ÷ ÚÊ¢iÚ.¶Ø^vYjYl¢{aj×îËb¢ybëaÆ®¶­s` ¤gVæ26¶å&öw&W72b33cµÆVgBÂb33cµF÷Âb33cµvGFÂb33cµVvB¢´b7G&ætå7G"õ5ERÂgV÷Cµtã3%ôåBgV÷C²FVࢲb33c¶âÒFÆÄ6ÆÂgV÷C·WFVÖRæFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´vWEFVÖT&÷W'FW2gV÷C²²ÂgV÷C¶çBgV÷C²Â¢´FÆÄ6ÆÂgV÷C·WFVÖRæFÆÂgV÷C²ÂgV÷C¶æöæRgV÷C²ÂgV÷Cµ6WEFVÖT&÷W'FW2gV÷C²ÂgV÷C¶çBgV÷C²Â¢´VæD`¢b33cµ6öçG&öÂÒuT7G&Ä7&VFU&öw&W72b33cµÆVgBÂb33cµF÷Âb33cµvGFÂb33cµVvB¢uT7G&Å6WD&´6öÆ÷"b33cµ6öçG&öÂÂb33c¶÷fW%ö6öÆ÷"¢uT7G&Å6WD6öÆ÷"b33cµ6öçG&öÂÂb33c¶'Fåö6öÆ÷"¢uT7G&Å6WDÆÖBÓÃâ´b7G&ætå7G"õ5ERÂgV÷Cµtã3%ôåBgV÷C²FVࢴFÆÄ6ÆÂgV÷C·WFVÖRæFÆÂgV÷C²ÂgV÷C¶æöæRgV÷C²ÂgV÷Cµ6WEFVÖT&÷W'FW2gV÷C²ÂgV÷C¶çBgV÷C²Âb33c¶å³Ò¢´VæD`¢&WGW&âb33cµ6öçG&öÀ¤VæDgVæ2³ÓÒfwCµ6¶å&öw&W70

let me know...

8)

Edited by Valuater

Share this post


Link to post
Share on other sites

i know its a dumb questions but im still a noob

if i have this:

#include <GuiConstants.au3>

GuiCreate("Prime Finder", 316, 111,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Button_1 = GuiCtrlCreateButton("Is It Prime?", 60, 60, 190, 30)

$Input_2 = GuiCtrlCreateInput("", 10, 20, 300, 30)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_1

;read the input box here then find out if it is prime.

;if it is prime the msgbox" the number is prime

;if it isn't prime then msgbox the number is not prime

EndSelect

WEnd

how do i put a skin on it. or do i have to start over with the skin.

im completly lost plz help


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

like this...

;===============================================================================
; The following is required
;===============================================================================

#include <XSkin.au3>

; required, your skin folder location
$Skin_Folder = FileReadLine(@ScriptDir & "\Skins\Default.txt", 1)
If Not FileExists($Skin_Folder) Then $Skin_Folder = FileSelectFolder("Skin Folders", @ScriptDir & "\Skins", 2)

;required, Set the GUIs to be event driven
AutoItSetOption("GUIOnEventMode", 1)

; option, automatic mouse-over color for "your" controls use $XSkinID[ ]
; see Autoit Limits in help for GUICtrlSetBkColor()
Dim $XSkinID[3] ; the amount of controls you want "mouse overed" +1, see example below

; required, set the GUI Width, Height and Title
$guiWidth = 416
$guiHeight = 211
$guiTitle = "Prime Finder"
$guiHeader = 1 ; Title bar,  -1 = show with Max/Min/Close, 0 = show title only, 1 = no show ( optional, default is no show )
$guiCorners = 1 ; 0 = no rounded corners ( optional, default is rounded )

; required, Create the XSkin GUI
$XSkinGui = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight, $Skin_Folder, $guiHeader, $guiCorners)
; or XSkinGUICreate( $guiTitle, $guiWidth, $guiHeight, $Skin_Folder)

; required, in while loop
; Mouseover()

; option, you can use the following theme colors
; $over_color, $btn_color, $bkg_color, $fnt_color

; option, for colored controls use the following.... or you can use autoit commands
; XSkinButton($Btext, $Bleft, $Btop, $Bwidth, $Bheight, $event_function)
; XSkinMsgBox($MBTitle, $MBText)
; XSkinInputBox($IBTitle, $IBText, $IBDefault = "")
; XSkinProgress($Pleft, $Ptop, $Pwidth, $Pheight)

;===============================================================================
; Now.... you are on your own
;===============================================================================

#include <GuiConstants.au3>

$Button_1 = XSkinButton ("Is It Prime?", 110, 100, 190, 20, "GetPrime")
$Button_2 = XSkinButton ("Exitt Prime?", 110, 130, 190, 20, "LeavePrime")
$XSkinID[1] = GUICtrlCreateInput("*Your Number*", 55, 50, 300, 20)

GUISetState()
While 1
    
    Mouseover () ; required
    Sleep(10)
    
    
WEnd

Func GetPrime()
    $info = GUICtrlRead($XSkinID[1])
    XSkinMsgBox ("XSkin", "Your question is " & $info)
    
    ; I am helping with the skin only right now
    
    ;read the input box here then find out if it is prime.
    ;if it is prime the msgbox" the number is prime
    ;if it isn't prime then msgbox the number is not prime
EndFunc   ;==>GetPrime

Func LeavePrime()
    Exit
EndFunc

8

Edited by Valuater

Share this post


Link to post
Share on other sites

Nice job....

It would be great if it can support PNG skins with semi-transparent too.

Edited by Dhilip

[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites

Valuater: I commented out the parts you suggested for Win 2k, and it worked fine.

/Sven

would you please test this for me

Func XSkinProgress($Pleft, $Ptop, $Pwidth, $Pheight)
    If StringInStr(@OSTYPE, "WIN32_NT") Then
        $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties");, "int", 0)
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
    EndIf
    $PControl = GUICtrlCreateProgress($Pleft, $Ptop, $Pwidth, $Pheight)
    GUICtrlSetBkColor($PControl, $over_color)
    GUICtrlSetColor($PControl, $btn_color)
    GUICtrlSetLimit(-1,100,0)
    If StringInStr(@OSTYPE, "WIN32_NT") and IsArray($XS_n)Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
    EndIf
    Return $PControl
EndFunc   ;==>XSkinProgress

I added the IsArray($XS_n)... that should do the trick for all users

Thanks

8)

Edited by Valuater

Share this post


Link to post
Share on other sites

Works nice !

Great Job

/Sven

Thanks

Sept 19, 2006

XSkin.au3 v1.2.1

Fixed Win 2000 XSkinProgress bug

* Added - Mouse-Over GUI options ( Slide-to-top, Transparent, Shrink )

* Added - Mouse-Over *All* Controls - See AUTOIT LIMITS

* Removed - "Event Mode" requirement

* Over 24 GUI Skins! - any size you want

* Skinned Progress Bar ( works on Xp Theme too! )

* Skinned InputBox

* Skinned Message Box

* Rounded Corners

8)

Edited by Valuater

Share this post


Link to post
Share on other sites

from examples page #2

Basic, A Skinned GUI and Button

#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")

GUISetState()

While 1
    
    MouseOver()
    
    Sleep(10)
WEnd

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

8)

Edited by Valuater

Share this post


Link to post
Share on other sites

from examples page #2

Basic, A Skinned GUI, Button and XSkinMsgBox

#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")

GUISetState()

While 1
    
    MouseOver()
    
    Sleep(10)
WEnd

Func Hello()
    XSkinMsgBox("XSkin", "Test Button 1")
EndFunc

8)

Share this post


Link to post
Share on other sites

It looks VERY nice, perhaps we could have some Skin-library for people to contribute with their own skins.

thats a great idea....

i plan on using the fileman folder for additional skins..

If someone posts a skin here... i will add it to the list.....

or post it on the deomonstration page

what ever works, is ok with me

if you have a better idea, let me know too

thanks

8)

BTW

.....Be sure to put this at the top of the dat file

Skin.dat

[Info]
Title = Red-Black
Author = Your Name
Edited by Valuater

Share this post


Link to post
Share on other sites

from examples page #2

Basic, ASkinned GUI, Button and XSkinInputBox

#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")

GUISetState()

While 1
    
    MouseOver()
    
    Sleep(10)
WEnd

Func Hello()
    XSkinInputBox("XSkin", "Test Button 1")
    XSkinInputBox("XSkin", "Test Button 1", "Default text")
EndFunc

8)

Share this post


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
Sign in to follow this  

×
×
  • Create New...