User Tools

Site Tools


Sidebar

<< Back


koda:en:documentation:complex_project

Complex project

Though Koda can't have an auxilary code inside it's GUI block, what limit it usefullnes for “dynamic” projects, with some simple tricks you still able use it.

Example 1

In this simplest example you will see how to load checkbox state from ini file.

$s_Config = @ScriptDir & "\config.ini"
 
#Region ### START Koda GUI section ### Form=MyForm.kxf
$hGUI = GUICreate("hGUI", 633, 454, 192, 114)
$hOnTop = GUICtrlCreateCheckbox("Always on top", 16, 24, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
 
GUICtrlSetState(IniRead($s_Config, "General", "OnTop", "4"))
 
;.....
 
 
Func SaveSettings()
  IniWrite($s_Config, "General", "OnTop", GUICtrlRead($hOnTop))
EndFunc

Now you will have chackbox flawessly load and save it's state, while you can update GUI part.

Example 2

koda/en/documentation/complex_project.txt · Last modified: 2014/07/10 10:47 (external edit)