Jump to content

_UskinLibrary.au3 (UDF) - Skin with DLL free (no ads) and fully functional!


JScript
 Share

Recommended Posts

cant seem to get the skin applied after it gets compiled .I am using win 7 x64

as instructed i have added the directives,on running the compiled exe i see only some of the controls getting skinned and the window flickers but the active title bar skin does not show up?

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2
#AutoIt3Wrapper_UseUpx=n ;(Y/N) Compress output program. Default=Y

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include"GUIConstantsEx.au3"
#include"WindowsConstants.au3"
#include "_UskinLibrary.au3"
#include "OldSkool.au3"; <-- This is an skin ".msstyles" embedded
_Uskin_LoadDLL()
_USkin_Init(_OldSkool(True)); <-- Put here your favorite Skin!!!
;


; AutoIt 3.0.103 example
; 17 Jan 2005 - CyberSlug
; This script shows manual positioning of all controls;
; there are much better methods of positioning...
#include
#include
#include

; GUI
$GUI = GuiCreate("Sample GUI", 400, 400)
GuiSetIcon(@SystemDir & "\mspaint.exe", 0)

Global $AU3PATH = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir")
If $AU3PATH = "" Then $AU3PATH = StringRegExpReplace(@AutoItExe,"\\[^\\]+\Z","",1)

; MENU
$MenuSkins = GuiCtrlCreateMenu("Skin")
$SkinItem = GUICtrlCreateMenuItem("Select...",$MenuSkins)
$SkinItem2 = GUICtrlCreateMenuItem("Select 2...",$MenuSkins)
$URLItem = GUICtrlCreateMenuItem("HOMEPAGE",$MenuSkins)

GuiCtrlCreateMenu("Menu&Two")
GuiCtrlCreateMenu("MenuTh&ree")
GuiCtrlCreateMenu("Menu&Four")

; CONTEXT MENU
$contextMenu = GuiCtrlCreateContextMenu()
GuiCtrlCreateMenuItem("Context Menu", $contextMenu)
GuiCtrlCreateMenuItem("", $contextMenu) ;separator
GuiCtrlCreateMenuItem("&Properties", $contextMenu)

; PIC
GuiCtrlCreatePic($AU3PATH & "\Examples\GUI\logo4.gif",0,0, 169,68,0)
GuiCtrlCreateLabel("Sample pic", 75, 1, 53, 15)
GuiCtrlSetColor(-1,0xffffff)
GUICtrlSetBkColor(-1,-2)


; AVI
GuiCtrlCreateAvi($AU3PATH & "\Examples\GUI\sampleAVI.avi",0, 180, 10, 32, 32, $ACS_AUTOPLAY)
GuiCtrlCreateLabel("Sample avi", 170, 50)


; TAB
GuiCtrlCreateTab(240, 0, 150, 70)
GuiCtrlCreateTabItem("One")
GuiCtrlCreateLabel("Sample Tab with tabItems", 250, 40)
GuiCtrlCreateTabItem("Two")
GuiCtrlCreateTabItem("Three")
GuiCtrlCreateTabItem("")

; COMBO
GuiCtrlCreatecombo("Sample Combo", 250, 80, 120, 100)

; PROGRESS
GuiCtrlCreateProgress(60, 80, 150, 20)
GuiCtrlSetData(-1, 60)
GuiCtrlCreateLabel("Progress:", 5, 82)

; EDIT
GuiCtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 110, 150, 70)

; LIST
GuiCtrlCreateList("", 5, 190, 100, 90)
GuiCtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List")

; ICON
GuiCtrlCreateIcon("shell32.dll", 1, 175, 120)
GuiCtrlCreateLabel("Icon", 180, 160, 50, 20)

; LIST VIEW
$listView = GuiCtrlCreateListView("Sample|ListView|", 110, 190, 110, 80)
GuiCtrlCreateListViewItem("A|One", $listView)
GuiCtrlCreateListViewItem("B|Two", $listView)
GuiCtrlCreateListViewItem("C|Three", $listView)

; GROUP WITH RADIO BUTTONS
GuiCtrlCreateGroup("Sample Group", 230, 120)
GuiCtrlCreateRadio("Radio One", 250, 140, 80)
GuiCtrlSetState(-1, $GUI_CHECKED)
GuiCtrlCreateRadio("Radio Two", 250, 165, 80)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

; UPDOWN
GuiCtrlCreateLabel("UpDown", 350, 115, 80,15)
GuiCtrlCreateInput("42", 350, 130, 40, 20)
GuiCtrlCreateUpDown(-1)

; LABEL
GuiCtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40)
GuiCtrlSetBkColor(-1, 0x00FF00)

; SLIDER
GuiCtrlCreateLabel("Slider:", 235, 215)
GuiCtrlCreateSlider(270, 210, 120, 30)
GuiCtrlSetData(-1, 30)

; INPUT
GuiCtrlCreateInput("Sample Input Box", 235, 255, 130, 20)

; DATE
GuiCtrlCreateDate("", 5, 280, 200, 20)
GuiCtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20)

; BUTTON
GuiCtrlCreateButton("Sample Button", 10, 330, 100, 30)

; CHECKBOX
GuiCtrlCreateCheckbox("Checkbox", 130, 335, 80, 20)
GuiCtrlSetState(-1, $GUI_CHECKED)

; TREEVIEW ONE
$treeOne = GuiCtrlCreateTreeView(210, 290, 80, 80)
$treeItem = GuiCtrlCreateTreeViewItem("TreeView", $treeOne)
GuiCtrlCreateTreeViewItem("Item1", $treeItem)
GuiCtrlCreateTreeViewItem("Item2", $treeItem)
GuiCtrlCreateTreeViewItem("Foo", -1)
GuiCtrlSetState($treeItem, $GUI_EXPAND)

; TREEVIEW TWO
$treeTwo = GuiCtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES)
GuiCtrlCreateTreeViewItem("TreeView", $treeTwo)
GuiCtrlCreateTreeViewItem("With", $treeTwo)
GuiCtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo)
GuiCtrlSetState(-1, $GUI_CHECKED)
GuiCtrlCreateTreeViewItem("Style", $treeTwo)


; GUI MESSAGE LOOP
GuiSetState()
While 1
$nMSG = GuiGetMsg()
Switch $nMSG
Case $GUI_EVENT_CLOSE
Exit
Case $SkinItem2
$StyleDir = @ScriptDir & "\Skins\"
$Skin = FileOpenDialog("Select Skin", $StyleDir, "Styles (*.msstyles)",3)
If Not @error Then _USkin_LoadSkin($Skin)
Case $SkinItem
$StyleDir = @WindowsDir & "\Resources\Themes\"
$Skin = FileOpenDialog("Select Skin", $StyleDir, "Styles (*.msstyles)",3)
If Not @error Then _USkin_LoadSkin($Skin)
Case $URLItem
ShellExecute("http://www.neemedia.com/newsite/index.php?entry=entry081110-153248")

EndSwitch
WEnd

Func OnAutoItExit()
_USkin_Exit()
EndFunc

Posted Image

Edited by codernoobx
Link to comment
Share on other sites

Where is the script being run from, and where are the skin files being stored?

EDIT: Almost forgot, if running on a 64 bit OS you need the line #AutoIt3Wrapper_UseX64=n added to the script, as this won't work in 64 bit mode.

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Update: The NEEMedia website (www.neemedia.com) is gone, offline. Seems like the developer of the USkin dll doesn't exist any longer.

BTW, has anyone found a way to get this to work with Unicode text on the controls that are skinned?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • 4 months later...

Hey, the windows 7 theme files doesn't work. This UDF works for only themes of win xp

That's correct, it will only work with *.msstyles formatted files from XP. Although the skins work just fine under Windows Vista+.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • 3 months later...
  • 9 months later...

Searching for a simple skin system, I saw other methods but this is very simple

So downloaded for previous post link (link OK !) and tested with latest autoit v3.3.12.0 on win8 and win7 64 bit.

Fully functional except for some minor glitches with some skins:  in a couple of skins progress bar not updating, but I repeat only in a couple of skins.

Applied to two  pre-existing GUIs of  scripts of mine with no problems.

For now  I'll will adopt this skin system in my projects, thank for you work.

Edited by t0nZ
Link to comment
Share on other sites

The end of a dream...

No I am kidding but I have had problems with a complex (for me...) GUI , there was 2 progress bar and after a number of updates of the second bar (after having opened and closed some sub-gui) freeze the entire script with one cpu core 100% .

Btw same script in standby:

  • no skin = cpu idle,
  • with skin one core 30%.

So I think I limit the use of this system only for simple and short scripts.

Link to comment
Share on other sites

  • 2 years later...

I'm sorry for reply to very old thread but this is the only worked skin without need to change my Existing Gui Buttons codes , this _UskinLibrary working very well but the and it's wonderful the only issue that screen always dim out win open program ( like I applied the skin to windows) 

Is there is anyway to solve this problem ? I hope...

 

Edited by abdulrahmanok
Solved
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...