ken82m Posted March 9, 2009 Share Posted March 9, 2009 (edited) Thanks to monoceres for the example to get me started on this.Saw a few posts here and there some worked most didn't.So I put together this UDF to make using this thing a little easier.Enjoy,KennyExample#include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDLL.dll");Load SkinCrafter DLL ;GUI With Initial Skin $GUI_1 = GuiCreate("Test", -1, -1, 0, 0) _InitializeSkinCrafter($GUI_1, "ice-cold.skf") GUICtrlCreateButton("Test", 50, 50, 50) GUISetState() ;GUI With Additional Skin Loaded & Applied $GUI_2 = GuiCreate("Test2", -1, -1, 200, 0) GUICtrlCreateButton("Test", 10, 10, 50) _LoadSkin("skinastic.skf", 2) _ApplySkin($GUI_2, 2) GUISetState() ;GUI with no skin applied $GUI_3 = GuiCreate("Test3", -1, -1, 400, 0) GUICtrlCreateButton("Test", 10, 10, 50) _ExcludeSkin($GUI_3) GUISetState() ;GUI with initial skin automatically applied $GUI_4 = GuiCreate("Test4", -1, -1, 600, 0) GUICtrlCreateButton("Test", 10, 10, 50) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEndUDFexpandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Kenneth P. Morrissey (ken82m) UDF Function: Enabled skinning of AutoIT GUI's using SkinCrafter (Tested with SkinCrafter 3.3.3) Example #include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDLL.dll");Load SkinCrafter DLL ;GUI With Initial Skin $GUI_1 = GuiCreate("Test", -1, -1, 0, 0) _InitializeSkinCrafter($GUI_1, "ice-cold.skf") GUICtrlCreateButton("Test", 50, 50, 50) GUISetState() ;GUI With Additional Skin Loaded & Applied $GUI_2 = GuiCreate("Test2", -1, -1, 200, 0) GUICtrlCreateButton("Test", 10, 10, 50) _LoadSkin("skinastic.skf", 2) _ApplySkin($GUI_2, 2) GUISetState() ;GUI with no skin applied $GUI_3 = GuiCreate("Test3", -1, -1, 400, 0) GUICtrlCreateButton("Test", 10, 10, 50) _ExcludeSkin($GUI_3) GUISetState() ;GUI with initial skin automatically applied $GUI_4 = GuiCreate("Test4", -1, -1, 600, 0) GUICtrlCreateButton("Test", 10, 10, 50) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEnd #ce ---------------------------------------------------------------------------- Global $nSkinCrafterDll #cs=================================================================================== Fuction _LoadSkinCrafter ( $nDLL ) Description Loads the SkinCrafter DLL into Memory This should be run before any GUI's are created. Parameter $nDLL The path to SkinCrafterDLL.dll Return Success 1 Failure 0 Sets @error: 1 - $nDLL Does Not Exist 2 - DLLOpen Failed Author Kenneth P. Morrissey (ken82m) #ce=================================================================================== Func _LoadSkinCrafter($nDLL) $nSkinCrafterDll = DllOpen($nDLL) If Not FileExists($nDLL) Then SetError(1) Return 0 EndIf If $nSkinCrafterDll = -1 Then SetError(2) Return 0 EndIf DllCall($nSkinCrafterDll, "int:cdecl", "InitLicenKeys", "wstr","SKINCRAFTER", "wstr","SKINCRAFTER.COM", "wstr", "support@skincrafter.com","wstr","DEMOSKINCRAFTERLICENCE") DllCall($nSkinCrafterDll, "int:cdecl", "DefineLanguage", "int", 0) Return 1 EndFunc #cs=================================================================================== Fuction _InitializeSkinCrafter ( $nHWND , $nSkin ) Description Load Initial Skin and Apply to GUI (Only Run ONCE) This should be run AFTER the GUI is created but BEFORE any controls. This skin will apply to all future GUI's by default. Parameter $nHWND Handle to the first GUI created $nSkin Path to Skin File (SKF) Return Success 1 Failure 0 Sets @error: 1 - $nInitialGUI Does Not Exist 2 - $nSkin Does Not Exist Author Kenneth P. Morrissey (ken82m) #ce=================================================================================== Func _InitializeSkinCrafter($nHWND, $nSkin) If Not WinExists($nHWND) Then SetError(1) Return 0 EndIf If Not FileExists($nSkin) Then SetError(2) Return 0 EndIf DllCall($nSkinCrafterDll, "int:cdecl", "InitDecoration", "int", 1) DllCall($nSkinCrafterDll, "int:cdecl", "LoadSkinFromFile", "wstr", $nSkin) DllCall($nSkinCrafterDll, "int:cdecl", "ApplySkin") DllCall($nSkinCrafterDll, "int:cdecl", "DecorateAs","long",$nHWND,"long",1) Return 1 EndFunc #cs=================================================================================== Fuction _ApplySkin ( $nHWND , $nSkinID ) Description Load Initial Skin and Apply to GUI (Only Run ONCE) No restrictions, this can be run at any time during the script after InitializeSkinCrafter() Parameter $nHWND Handle to the first GUI created $nSkinID ID of loaded skin to apply (Must be greater than 1) Return Success 1 Failure 0 Sets @error: 1 - $nHWND Does Not Exist 2 - $nSkinID is invalid Author Kenneth P. Morrissey (ken82m) #ce=================================================================================== Func _ApplySkin($nHWND, $nSkinID) If Not WinExists($nHWND) Then SetError(1) Return 0 EndIf If $nSkinID > 1 Then DllCall($nSkinCrafterDll, "int:cdecl", "ApplyAddedSkin","long",$nHWND,"long",$nSkinID) Return 1 Else SetError(2) Return 0 EndIf EndFunc #cs=================================================================================== Fuction _LoadSkin ( $nSkin , $nSkinID ) Description Load additional skin file. Parameter $nSkin Path to the skin file being loaded $nSkinID ID to associate with the skin (Must be a number greater than 1) Return Success 1 Failure 0 Sets @error: 1 - $nSkin Does Not Exist 2 - $nSkinID is Inavlid Author Kenneth P. Morrissey (ken82m) #ce=================================================================================== Func _LoadSkin($nSkin, $nSkinID) If Not FileExists($nSkin) Then SetError(1) Return 0 EndIf If $nSkinID > 1 Then DllCall($nSkinCrafterDll, "int:cdecl", "AddSkinFromFile", "wstr", $nSkin, "short",$nSkinID) Return 1 Else SetError(2) Return 0 EndIf EndFunc #cs=================================================================================== Fuction _ExcludeSkin ( $nHWND ) Description Excludes a GUI from all loaded skins. Parameter $nHWND Handle to the GUI to exclude Return Success 1 Failure 0 Sets @error: 1 - $nHWND Does Not Exist Author Kenneth P. Morrissey (ken82m) #ce=================================================================================== Func _ExcludeSkin($nHWND) If Not WinExists($nHWND) Then SetError(1) Return 0 EndIf DllCall($nSkinCrafterDll, "int:cdecl", "ExcludeWnd", "long", $nHWND) Return 1 EndFunc Edited March 9, 2009 by ken82m "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 comment Share on other sites More sharing options...
James Posted March 9, 2009 Share Posted March 9, 2009 This may sound really stupid, but can you post some screenshots of it on an AutoIt GUI? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
ken82m Posted March 9, 2009 Author Share Posted March 9, 2009 Added to first post. You can see shots of different skins here: http://www.skincrafter.com/skingal.php-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 comment Share on other sites More sharing options...
AdmiralAlkex Posted March 9, 2009 Share Posted March 9, 2009 Looks cool on the screenshot but I don't understand how to use it, will I need the fullversion of SkinCrafter or is the demo enough? What's the difference between them? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
ProgAndy Posted March 9, 2009 Share Posted March 9, 2009 (edited) The demo always shows a splash when a style is assigned to a window and the user has to close it.USkin ( http://www.neemedia.com/newsite/index.php?category=5 ) has some free functions without splash, but you can only set .msstyles (default windows styles, no transparency) global for you app. Edited March 9, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 9, 2009 Share Posted March 9, 2009 The demo always shows a splash when a style is assigned to a window and the user has to close it.USkin ( http://www.neemedia.com/newsite/index.php?category=5 ) has some free functions without splash, but you can only set .msstyles (default windows styles, no transparency) global for you app.Thanks ProgAndy. I am never gonna pay 400 usd for a splash screen but I will take a look at USkin .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
FireFox Posted March 9, 2009 Share Posted March 9, 2009 Thanks ProgAndy. I am never gonna pay 400 usd for a splash screen but I will take a look at USkin Right... @topic ownerNice skin and goodjob Cheers, FireFox. Link to comment Share on other sites More sharing options...
yehia Posted March 9, 2009 Share Posted March 9, 2009 lucky me i have the dll but im facing a problem with tabs every time i use SkinCrafter if u test this script i posted u will see that every input control do not have a boarder strange but true can u help with that? take a look on the script #include <SkinCrafter.au3> _LoadSkinCrafter("Skin.dll");Load SkinCrafter DLL $Form1 = GUICreate("Test", 615, 400) _InitializeSkinCrafter($Form1, "skin.skf") $hTab = GUICtrlCreateTab(205, 70, 380, 270) GUICtrlCreateTabItem("One") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; GUICtrlCreateInput("", 340, 210, 200, 20) GUICtrlCreateInput("", 345, 270, 40, 20) GUICtrlCreateCombo("1", 395, 270, 68, 20) GUICtrlSetData(-1, "2|3", "1") GUICtrlCreateButton("ok", 270, 305, 90, 25) GUICtrlCreateButton("cancel", 400, 305, 90, 25) GUICtrlCreateTabItem("Two") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; GUICtrlCreateInput("", 300, 207, 80, 20) GUICtrlCreateInput("", 450, 207, 80, 20) GUICtrlCreateInput("", 300, 237, 100, 20) GUICtrlCreateInput("", 450, 237, 30, 20) GUICtrlCreateInput("", 345, 270, 40, 20) GUICtrlCreateCombo("1", 395, 270, 68, 20) GUICtrlSetData(-1, "2|3", "1") GUICtrlCreateButton("ok", 270, 305, 90, 25) GUICtrlCreateButton("cancel", 400, 305, 90, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 If GuiGetMsg()=-3 Then Exit WEnd My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
ken82m Posted March 10, 2009 Author Share Posted March 10, 2009 Like andy said you get the nag screen.Luckily a friend of mine had the full for me to play with.You could try the window info tool. Maybe you can close the window as soon as it comes up.KennyLooks cool on the screenshot but I don't understand how to use it, will I need the fullversion of SkinCrafter or is the demo enough? What's the difference between them? "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 comment Share on other sites More sharing options...
Enforcer Posted March 11, 2009 Share Posted March 11, 2009 (edited) You meen, you so something like this ? )))http://www.autoitscript.com/forum/index.ph...35&hl=Skins Edited March 11, 2009 by Enforcer [RU] Zone Link to comment Share on other sites More sharing options...
Enforcer Posted March 11, 2009 Share Posted March 11, 2009 Please post last demo skin crafter dll and I'l see what can I do for you [RU] Zone Link to comment Share on other sites More sharing options...
toxicvn Posted March 12, 2009 Share Posted March 12, 2009 hey it not working for mehelp me#include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDll.dl");Load SkinCrafter DLL ;GUI With Initial Skin $GUI_1 = GuiCreate("Test", -1, -1, 0, 0) _InitializeSkinCrafter($GUI_1, "Zondar.skf") GUICtrlCreateButton("Test", 50, 50, 50) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEnddll flie: SkinCrafterDll.dllhttp://www.mediafire.com/download.php?nyynzgemymj Link to comment Share on other sites More sharing options...
Enforcer Posted March 12, 2009 Share Posted March 12, 2009 (edited) Maybe here is the problem:try replace >> _LoadSkinCrafter("SkinCrafterDll.dl");Load SkinCrafter DLLto_LoadSkinCrafter("SkinCrafter.dll");Load SkinCrafter DLL * I cant run your ScinCrafter DLL he says that some file missing !!!* We need other ScinCrafter DLL !!! Edited March 12, 2009 by Enforcer [RU] Zone Link to comment Share on other sites More sharing options...
toxicvn Posted March 12, 2009 Share Posted March 12, 2009 i changed but it still not working try replace >> _LoadSkinCrafter("SkinCrafterDll.dl");Load SkinCrafter DLL to _LoadSkinCrafter("SkinCrafter.dll");Load SkinCrafter DLL #include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDll.dll");Load SkinCrafter DLL ;GUI With Initial Skin $GUI_1 = GuiCreate("Test", -1, -1, 0, 0) GUICtrlCreateButton("Test", 50, 50, 50) _ApplySkin($GUI_1, "Zondar.skf") _InitializeSkinCrafter($GUI_1, "Zondar.skf") _ExcludeSkin($GUI_1) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEnd Link to comment Share on other sites More sharing options...
ken82m Posted March 12, 2009 Author Share Posted March 12, 2009 (edited) here ya go http://www.mediafire.com/?sharekey=0fddc05...2db6fb9a8902bdaI don't have any ideas on the tabs, I hardly ever use them so I hadn't noticed.So far it has worked with everything thing else gui related for me.However one thing that didn't work was msgbox's.they work but the buttom of the window where the buttons are is just a white stripe.i just used the _MsgBox function from the forum and problem solved.Kenny Edited March 12, 2009 by ken82m "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 comment Share on other sites More sharing options...
ken82m Posted March 13, 2009 Author Share Posted March 13, 2009 (edited) You just need to remove this line, that function is designed to specify a GUI you don't want the skin to apply to. _ExcludeSkin($GUI_1) You can also remove the _ApplySkin line. It's just needed when you load a second skin in the same script. This is all you need for your script: #include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDll.dll");Load SkinCrafter DLL $GUI_1 = GuiCreate("Test", -1, -1, 0, 0) _InitializeSkinCrafter($GUI_1, "Zondar.skf") GUICtrlCreateButton("Test", 50, 50, 50) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEnd Kenny Edited March 13, 2009 by ken82m "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 comment Share on other sites More sharing options...
toxicvn Posted March 13, 2009 Share Posted March 13, 2009 (edited) i changed and it is working i see very nice skin , i like it ,now my scrpit is working !!!!!!!!!! thank try replace >> _LoadSkinCrafter("SkinCrafterDll.dl");Load SkinCrafter DLL to _LoadSkinCrafter("SkinCrafter.dll");Load SkinCrafter DLL #include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDll.dll");Load SkinCrafter DLL ;GUI With Initial Skin $GUI_1 = GuiCreate("Test", -1, -1, 0, 0) _InitializeSkinCrafter($GUI_1, "Zondar.skf") GUICtrlCreateButton("Test", 50, 50, 50) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEnd Edited March 13, 2009 by toxicvn Link to comment Share on other sites More sharing options...
HAL9000 Posted March 13, 2009 Share Posted March 13, 2009 this is my code but I do not see any difference #include <SkinCrafter.au3> _LoadSkinCrafter("SkinCrafterDll.dll");Load SkinCrafter DLL $GUI_1 = GuiCreate("Test", -1, -1, -1,-1) _InitializeSkinCrafter($GUI_1, "SkinasticST.skf") GUICtrlCreateButton("Test", 50, 50, 50) GUISetState() While 1 If GuiGetMsg()=-3 Then Exit WEnd Link to comment Share on other sites More sharing options...
yehia Posted March 13, 2009 Share Posted March 13, 2009 im still having the same problem with tab controls and to make it worth create the tab control and try moving the program window out of the screen dimensions all the controls drown on the tab will disappear still strange and annoying My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
Andreik Posted June 8, 2009 Share Posted June 8, 2009 (edited) Where I could find SkinCrafterDll.dll? Edited June 8, 2009 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now