Attribute VB_Name = "PanelColorFunction" Public Sub PanelColorTest(ByRef intPanelColorCount As Integer) Select Case intPanelColorCount Case 1 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 0, 0, 1, 0, Mid(frmTCPTest.txtPanelColor.Text, 1, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 2 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 8, 0, 0, 2, Mid(frmTCPTest.txtPanelColor.Text, 2, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 3 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 16, 0, 0, 3, Mid(frmTCPTest.txtPanelColor.Text, 3, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 4 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 24, 0, 0, 2, Mid(frmTCPTest.txtPanelColor.Text, 4, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 5 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 32, 0, 0, 3, Mid(frmTCPTest.txtPanelColor.Text, 5, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 6 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 40, 0, 2, 1, Mid(frmTCPTest.txtPanelColor.Text, 6, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 7 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 48, 0, 2, 3, Mid(frmTCPTest.txtPanelColor.Text, 7, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 8 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 56, 0, 3, 1, Mid(frmTCPTest.txtPanelColor.Text, 8, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 9 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 64, 0, 3, 2, Mid(frmTCPTest.txtPanelColor.Text, 9, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 10 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 72, 0, 2, 1, Mid(frmTCPTest.txtPanelColor.Text, 10, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 11 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 80, 0, 2, 3, Mid(frmTCPTest.txtPanelColor.Text, 11, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 12 frmTCPTest.TimerPanelColor.Enabled = False frmTCPTest.XDLite1.SendMessage 88, 0, 0, 1, Mid(frmTCPTest.txtPanelColor.Text, 12, 1) intPanelColorCount = intPanelColorCount + 1 frmTCPTest.TimerPanelColor.Enabled = True Case 13 frmTCPTest.TimerPanelColor.Enabled = False intPanelColorCount = 1 frmTCPTest.TimerPanelColor2.Enabled = True Case Else End Select End Sub Public Sub PanelColorTest2(ByRef intPanelColorCount2 As Integer) Select Case intPanelColorCount2 Case 1 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 1) * 8, 0, 1, 0, Mid(frmTCPTest.txtPanelColor2.Text, 12, 1) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 2 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 2) * 8, 0, 1, 0, Mid(frmTCPTest.txtPanelColor2.Text, 11, 2) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 3 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 3) * 8, 0, 1, 0, Mid(frmTCPTest.txtPanelColor2.Text, 10, 3) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 4 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 1) * 8, 0, 2, 0, Mid(frmTCPTest.txtPanelColor2.Text, 9, 1) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 5 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 2) * 8, 0, 2, 0, Mid(frmTCPTest.txtPanelColor2.Text, 8, 2) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 6 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 3) * 8, 0, 2, 0, Mid(frmTCPTest.txtPanelColor2.Text, 7, 3) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 7 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 1) * 8, 0, 3, 0, Mid(frmTCPTest.txtPanelColor2.Text, 6, 1) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 8 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 2) * 8, 0, 3, 0, Mid(frmTCPTest.txtPanelColor2.Text, 5, 2) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 9 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 3) * 8, 0, 3, 0, Mid(frmTCPTest.txtPanelColor2.Text, 4, 3) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 10 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 1) * 8, 0, 2, 0, Mid(frmTCPTest.txtPanelColor2.Text, 3, 1) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 11 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 2) * 8, 0, 2, 0, Mid(frmTCPTest.txtPanelColor2.Text, 2, 2) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 12 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (intPanelColorCount2 - 3) * 8, 0, 2, 0, Mid(frmTCPTest.txtPanelColor2.Text, 1, 3) intPanelColorCount2 = intPanelColorCount2 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 13 frmTCPTest.TimerPanelColor2.Enabled = False intPanelColorCount2 = 1 frmTCPTest.XDLite1.Clear frmTCPTest.TimerPanelColor.Enabled = True Case Else End Select End Sub Public Sub PanelColorTest3(ByRef intPanelColorCount3 As Integer) Select Case intPanelColorCount3 Case 1 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - (intPanelColorCount3 * 8)), 0, 1, 0, Mid(frmTCPTest.txtPanelColor3.Text, 1, 1) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 2 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 1, 0, Mid(frmTCPTest.txtPanelColor3.Text, 1, 2) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 3 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 1, 0, Mid(frmTCPTest.txtPanelColor3.Text, 1, 3) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 4 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 2, 0, Mid(frmTCPTest.txtPanelColor3.Text, 4, 1) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 5 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 2, 0, Mid(frmTCPTest.txtPanelColor3.Text, 4, 2) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 6 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 2, 0, Mid(frmTCPTest.txtPanelColor3.Text, 4, 3) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 7 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 3, 0, Mid(frmTCPTest.txtPanelColor3.Text, 7, 1) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 8 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 3, 0, Mid(frmTCPTest.txtPanelColor3.Text, 7, 2) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 9 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 3, 0, Mid(frmTCPTest.txtPanelColor3.Text, 7, 3) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 10 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 2, 0, Mid(frmTCPTest.txtPanelColor3.Text, 10, 1) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 11 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 2, 0, Mid(frmTCPTest.txtPanelColor3.Text, 10, 2) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 12 frmTCPTest.TimerPanelColor2.Enabled = False frmTCPTest.XDLite1.SendMessage (96 - intPanelColorCount3 * 8), 0, 2, 0, Mid(frmTCPTest.txtPanelColor3.Text, 10, 3) intPanelColorCount3 = intPanelColorCount3 + 1 frmTCPTest.TimerPanelColor2.Enabled = True Case 13 frmTCPTest.TimerPanelColor2.Enabled = False intPanelColorCount3 = 1 frmTCPTest.XDLite1.Clear frmTCPTest.TimerPanelColor.Enabled = True Case Else End Select End Sub