

;=============================================================================================
If OpenPreferences("skin.ini")
nomer.s=ReadPreferenceString("nomer", "")
skin.s=ReadPreferenceString("skin"+nomer, "")
ClosePreferences()
EndIf
;=============================================================================================
Global UnLoadSkin.l
Procedure Skin(skin.s)
OpenLibrary(0, "SkinFeature.dll")
InitializeSkin.l = GetFunction(0, "InitializeSkin")
LoadSkinFile.l = GetFunction(0, "LoadSkinFile")
UnLoadSkin.l = GetFunction(0, "UnLoadSkin")
InitLicenKeys.l = GetFunction(0, "InitLicenKeys")
rrr.s="Skin/"+skin.s
CallFunctionFast(InitializeSkin)
CallFunctionFast(InitLicenKeys, @"********-****-****-****-*************")
CallFunctionFast(LoadSkinFile, @rrr.s, @"") ; Надеваем скин из файла на диске
EndProcedure
Skin(skin.s)
;=============================================================================================
Enumeration
#Window_0
#Button_0
#Button_2
#Skin
#CheckBox_3
#ScrollBar_4
#Option_5
#String_6
#Panel_7
#Text_8
#Editor_9
#Track
EndEnumeration
If OpenWindow(#Window_0, 450, 200, 455, 300, " Стиль: Corona", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_Invisible )
PureCOLOR_SetWindowColor(#Window_0,RGB(240, 240, 240))
TrackBarGadget(#Track,10,40,180,20,0,100)
SetGadgetState(#Track, 50)
ButtonGadget(#Button_0, 15, 205, 105, 20, "Gadget_0")
ButtonGadget(#Button_2, 125, 205, 105, 20, "Gadget_2")
ButtonGadget(#Skin, 15, 240, 300, 25, "Сменить стиль")
CheckBoxGadget(#CheckBox_3, 10, 155, 125, 20, "Gadget_3")
ScrollBarGadget(#ScrollBar_4, 5, 120, 225, 20, 0, 100, 25)
OptionGadget(#Option_5, 10, 175, 85, 15, "Gadget_5")
StringGadget(#String_6, 5, 75, 220, 20, "Gadget_6")
TextGadget(#Text_8, 235, 75, 180, 20, "Gadget_8")
EditorGadget(#Editor_9, 5, 10, 415, 25)
PanelGadget(#Panel_7, 240, 115, 190, 110)
AddGadgetItem(#Panel_7, -1, "Tab #1")
AddGadgetItem(#Panel_7, -1, "Tab #2")
CloseGadgetList()
EndIf
HideWindow(#Window_0,0)
Repeat
Event = WaitWindowEvent()
Window = EventWindow()
Gadget = EventGadget()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case #Skin
If Val(nomer)=27
nomer="1"
EndIf
nomer.s=Str(Val(nomer)+1)
OpenPreferences("skin.ini")
WritePreferenceString("nomer",nomer.s)
ClosePreferences()
RunProgram(ProgramFilename())
Break
EndSelect
EndSelect
If Event = #PB_Event_CloseWindow
Break
EndIf
ForEver
CallFunctionFast(UnLoadSkin)
;
Пример скринов для разных стилей:







Enumeration #Window_0 #D240:#D360:#D480:#D720:#Dflv: #Tex4: #Cont1:#Cont2 #Web_VK: #Panel_1:#Panel_2:#Panel_3: #Spisok:#Search: #Poisk EndEnumeration If OpenWindow(#Window_0,0,0,820,485,"Dark Soft style",#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_Invisible) PureCOLOR_SetWindowColor(#Window_0,RGB(16, 16, 16)) ButtonGadget(#D240,525,400,40,20, "240") ButtonGadget(#D360,570,400,40,20, "360") ButtonGadget(#D480,615,400,40,20, "480") ButtonGadget(#D720,660,400,40,20, "720") ButtonGadget(#Dflv,735,400,40,20, "flv") ;------------------------------------------------ PanelGadget(#Panel_1,-5,-7,850,31) HyperLinkGadget(#Tex4,20,10,90,15,"Строка текста",RGB(255, 255, 255)) PureCOLOR_SetGadgetColor(#Tex4,RGB(243, 243, 243), #PureCOLOR_DontSetBackColor) SetGadgetColor(#Tex4,#PB_Gadget_FrontColor,RGB(116, 116, 116)) CloseGadgetList() ;------------------------------------------------ PanelGadget(#Panel_2,-5,425,850,41) StringGadget(#Search,35,12,220,20,"National Geographic") PureCOLOR_SetGadgetColor(#Search,RGB(116, 116, 116),RGB(51, 51, 51)) ButtonGadget(#Poisk,280,12,100,20, "Поиск") CloseGadgetList() ;------------------------------------------------ PanelGadget(#Panel_3,10,30,502,390) ContainerGadget(#Cont1,10,15,482,360, #PB_Container_BorderLess) WebGadget(#Web_VK,0,0,500,380,"logo.html") ; CloseGadgetList() CloseGadgetList() ;------------------------------------------------ ContainerGadget(#Cont2,525,35,272,355,#PB_Container_BorderLess) ListIconGadget(#Spisok,0,0,272,355,"Время",50,#PB_ListIcon_GridLines) SetGadgetColor(#Spisok, #PB_Gadget_BackColor, RGB(16, 16, 16)) SetGadgetColor(#Spisok, #PB_Gadget_FrontColor,RGB(112, 112, 112)) SetGadgetColor(#Spisok, #PB_Gadget_LineColor, RGB(41, 41, 41)) AddGadgetColumn(#Spisok,0, " Результат", 200) CloseGadgetList() EndIf HideWindow(#Window_0,0) Repeat Event = WaitWindowEvent() Until Event = #PB_Event_CloseWindow If rez=1 CallFunctionFast(UnLoadSkin) EndIf ;