Jump to content
Sign in to follow this  
Glyph

XSkin GUI skin changer problem

Recommended Posts

#include<xskin.au3>
; required, set the GUI Width, Height and Title
$guiWidth = 300
$guiHeight = 200
$guiTitle = "Connector"
$guiHeader = 1; Title bar,  -1 = show with Max/Min/Close, 0 = show title only, 1 = no show ( optional, default is no show )
$guiCorners = 25; 0 = no rounded corners, ( optional, default is rounded with "arc" of 25)

; required, create the XSkin GUI
Dim $XSkinGui = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight, @ScriptDir & "\Skins\HeavenlyBodies", $guiHeader, $guiCorners)
; or $XSkinGui = XSkinGUICreate( $guiTitle, $guiWidth, $guiHeight, $Skin_Folder); uses defaults

; option, create Title Bar Icons - returns array[]
; 1 = Exit only, 2 = Mnimize/Exit, 3 = Help/Minimize/Exit
$Icon_Folder = @ScriptDir & "\Skins\Default"


GUICtrlCreateLabel("Ip Address:",60,45)
$ipaddress = GUICtrlCreateInput ("", 60,60, 90, 20)


$Label_1 = GUICtrlCreateLabel("Default is HeavenlyBodies",20,90,130,15)
$Combo_2 = GuiCtrlCreateCombo("", 20, 110, 125, 100)
GuiCtrlSetData($combo_2, "Pick a Skin|\Blue-Gray\|Carbon\|\DeFacto|HeavenlyBodies|Light-Green|Lizondo|Rezak|Sand-Paper")

GUICtrlCreateLabel("Port:",161,45,30,20)
$port = GUICtrlCreateInput ("7809", 161,60, 50, 20)
;GUICtrlCreateLabel("Default is HeavenlyBodies",20,90,130,15)
$send = GuiCtrlCreateButton ("Connect",170,90,70,20);were gunna have to put in another gui that pops up when connection is successful
$exits = GuiCtrlCreateButton ("Exit",170,115,70,20)
$save = GuiCtrlCreateButton ("Save GUI",46,135,70,20)
GUICtrlCreateLabel("By: Team EcS (c) 2007",130,160,110,15)
UDPStartup()
If @error <> 0 Then Exit
GUISetState(@SW_SHOW)

;while WEnd loop
While 1
    $msg = GUIGetMsg()
    if $msg = $exits Then
    Exit
    EndIf
      
    If $msg = $save Then
        $data = GUICtrlRead($Combo_2)
      GuiCtrlSetData($Label_1, $data)
$XSkinGui2 = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight,@ScriptDir & "\Skins\"&$data, $guiHeader, $guiCorners)
    EndIf
WEnd

how do i get a new gui to pop up with the new skin?

and have it exit the old.

Share this post


Link to post
Share on other sites

Maybe...

#include<xskin.au3>
; required, set the GUI Width, Height and Title
$guiWidth = 300
$guiHeight = 200
$guiTitle = "Connector"
$guiHeader = 1; Title bar,  -1 = show with Max/Min/Close, 0 = show title only, 1 = no show ( optional, default is no show )
$guiCorners = 25; 0 = no rounded corners, ( optional, default is rounded with "arc" of 25)
$data = "HeavenlyBodies"
; required, create the XSkin GUI
;Dim $XSkinGui = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight, $data, $guiHeader, $guiCorners)
; or $XSkinGui = XSkinGUICreate( $guiTitle, $guiWidth, $guiHeight, $Skin_Folder); uses defaults

; option, create Title Bar Icons - returns array[]
; 1 = Exit only, 2 = Mnimize/Exit, 3 = Help/Minimize/Exit
$Icon_Folder = @ScriptDir & "\Skins\Default"



    
    Dim $XSkinGui = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight, @ScriptDir & "\Skins\"&$data, $guiHeader, $guiCorners)
    
    GUICtrlCreateLabel("Ip Address:",60,45)
    Dim $ipaddress = GUICtrlCreateInput ("", 60,60, 90, 20)


    Dim $Label_1 = GUICtrlCreateLabel("Default is HeavenlyBodies",20,90,130,15)
    Dim $Combo_2 = GuiCtrlCreateCombo("", 20, 110, 125, 100)
    GuiCtrlSetData($combo_2, "Pick a Skin|\Blue-Gray\|Carbon\|\DeFacto|HeavenlyBodies|Light-Green|Lizondo|Rezak|Sand-Paper")

    GUICtrlCreateLabel("Port:",161,45,30,20)
    Dim $port = GUICtrlCreateInput ("7809", 161,60, 50, 20)
    ;GUICtrlCreateLabel("Default is HeavenlyBodies",20,90,130,15)
    Dim $send = GuiCtrlCreateButton ("Connect",170,90,70,20);were gunna have to put in another gui that pops up when connection is successful
    Dim $exits = GuiCtrlCreateButton ("Exit",170,115,70,20)
    Dim $save = GuiCtrlCreateButton ("Save GUI",46,135,70,20)
    GUICtrlCreateLabel("By: Team EcS (c) 2007",130,150,110,15)
    UDPStartup()
    If @error <> 0 Then Exit
    GUISetState(@SW_SHOW)
    



;while WEnd loop
While 1
    $msg = GUIGetMsg()
    
    if $msg = $exits Then Exit
      
    If $msg = $save Then
        $data = GUICtrlRead($Combo_2)
        GUIDelete("")
        Create_GUI($data)
        GuiCtrlSetData($Label_1, $data)
    EndIf
WEnd

Func Create_GUI($type="")
    
    Dim $XSkinGui = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight, @ScriptDir & "\Skins\"&$data, $guiHeader, $guiCorners)
    
    GUICtrlCreateLabel("Ip Address:",60,45)
    Dim $ipaddress = GUICtrlCreateInput ("", 60,60, 90, 20)


    Dim $Label_1 = GUICtrlCreateLabel("Default is HeavenlyBodies",20,90,130,15)
    Dim $Combo_2 = GuiCtrlCreateCombo("", 20, 110, 125, 100)
    GuiCtrlSetData($combo_2, "Pick a Skin|\Blue-Gray\|Carbon\|\DeFacto|HeavenlyBodies|Light-Green|Lizondo|Rezak|Sand-Paper")

    GUICtrlCreateLabel("Port:",161,45,30,20)
    Dim $port = GUICtrlCreateInput ("7809", 161,60, 50, 20)
    ;GUICtrlCreateLabel("Default is HeavenlyBodies",20,90,130,15)
    Dim $send = GuiCtrlCreateButton ("Connect",170,90,70,20);were gunna have to put in another gui that pops up when connection is successful
    Dim $exits = GuiCtrlCreateButton ("Exit",170,115,70,20)
    Dim $save = GuiCtrlCreateButton ("Save GUI",46,135,70,20)
    GUICtrlCreateLabel("By: Team EcS (c) 2007",130,160,110,15)
    
    GUISetState(@SW_SHOW)
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...