#include #include #include ;Needed for ComboBox #include #include #include #include ;_GUICtrlTab_GetCurFocus #Region ### START Koda GUI section ### Form= Global $iCurrentTab ; Main Window Parameters $StartXSize = 720 $StartYSize = 437 $StartXPos = 192 $StartYPos = 124 $Form1 = GUICreate("Form1", $StartXSize, $StartYSize, $StartXPos, $StartYPos) $Tabs = GUICtrlCreateTab(16, 16, $StartXSize-40, $StartYSize-40) $TabItemADC = GUICtrlCreateTabItem("TAB1") ;**** TAB 1 **** ; TODO ;**** TAB 2 - DAC1 **** Local $xstart = 40 Local $ystart = 64 Local $xspace = 50 $TabItemDAC = GUICtrlCreateTabItem("DAC") ;Label $lDac1 = GUICtrlCreateLabel("DAC1", $xstart, $ystart + 4 , 120, 20) ;ComboBox Command $cbCmdDac1 = GUICtrlCreateCombo("VAL", $xstart + $xspace, 64, 45, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($cbCmdDac1,"SPAN" & "|" & "RANGE") ;ComboBox Channel $cbChDac1 = GUICtrlCreateCombo("Ch0", $xstart + 2*$xspace, 64, 45, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($cbChDac1,"Ch1" & "|" & "Ch2"& "|" & "Ch3"& "|" & "Ch4"& "|" & "Ch5"& "|" & "Ch6"& "|" & "Ch7"& "|" & "Ch8"& "|" & "Ch9"& "|" & "Ch10"& "|" & "Ch11" & "|" & "Ch12"& "|" & "Ch13"& "|" & "Ch14"& "|" & "Ch15") ;Line Edit $leValDac1 = GUICtrlCreateInput("0x0000", $xstart + 3*$xspace, 64, 50, 21) ;Button $btDac1 = GUICtrlCreateButton("Apply", $xstart + 5*$xspace, 64, 50, 21) ;#cs ;#comments-start ;**** TAB 2 - DAC2 **** $xstart = 40 $ystart = $ystart + 40 $xspace = 50 Local $yspace = 30 ;Label $lDac2 = GUICtrlCreateLabel("DAC2", $xstart, ($ystart + 4)+2*$yspace , 120, 20) ;ComboBox Command $cbCmdDac2 = GUICtrlCreateCombo("VAL", $xstart + $xspace, $ystart +2*$yspace, 45, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($cbCmdDac2,"SPAN" & "|" & "RANGE") ;ComboBox Channel $cbChDac2 = GUICtrlCreateCombo("Ch0", $xstart + 2*$xspace, $ystart +2*$yspace, 45, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($cbChDac2,"Ch1" & "|" & "Ch2"& "|" & "Ch3"& "|" & "Ch4"& "|" & "Ch5"& "|" & "Ch6"& "|" & "Ch7"& "|" & "Ch8"& "|" & "Ch9"& "|" & "Ch10"& "|" & "Ch11" & "|" & "Ch12"& "|" & "Ch13"& "|" & "Ch14"& "|" & "Ch15") ;Line Edit $leValDac2 = GUICtrlCreateInput("0x0000", $xstart + 3*$xspace, $ystart +2*$yspace, 50, 21) ;Button $btDac2 = GUICtrlCreateButton("Apply", $xstart + 5*$xspace, $ystart +2*$yspace, 50, 21) ;#ce ;#comments-end ;GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) $iCurrentTab = _GUICtrlTab_GetCurFocus($Tabs) ; READY! ConsoleWrite("Running.." & @CRLF) ;DEBUG Console #EndRegion ### END Koda GUI section ### ;********************************************** ;********************************************** ;********************************************** ; *************** MAIN LOOP ******************* ;********************************************** ;********************************************** ;********************************************** While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd