arkadaşlar bana acil yardım edin bana basicde port kullanımı ve örnekleri lazım hiçbiryerde bulamadım yardım ederseniz çok sevinirim ödevim için lazım şimdiden saolu.
basic de port kullanımı
'FORM KISMI
Private Sub Check1_Click()
If Check1.Caption = "No" Then
Check1.Value = 1
Check1.Caption = "Yes"
Clock1.Caption = MaskEdBox1.Text & " ON"
Clock1.Visible = True
ElseIf Check1.Caption = "Yes" Then
Check1.Value = 0
Check1.Caption = "No"
Clock1.Visible = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Caption = "No" Then
Check2.Value = 1
Check2.Caption = "Yes"
Clock2.Caption = MaskEdBox3.Text & " ON"
Clock2.Visible = True
ElseIf Check2.Caption = "Yes" Then
Check2.Value = 0
Check2.Caption = "No"
Clock2.Visible = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Caption = "No" Then
Check3.Value = 1
Check3.Caption = "Yes"
Clock3.Caption = MaskEdBox5.Text & " ON"
Clock3.Visible = True
ElseIf Check3.Caption = "Yes" Then
Check3.Value = 0
Check3.Caption = "No"
Clock3.Visible = False
End If
End Sub
Private Sub Check4_Click()
If Check4.Caption = "No" Then
Check4.Value = 1
Check4.Caption = "Yes"
Clock4.Caption = MaskEdBox7.Text & " ON"
Clock4.Visible = True
ElseIf Check4.Caption = "Yes" Then
Check4.Value = 0
Check4.Caption = "No"
Clock4.Visible = False
End If
End Sub
Private Sub Check5_Click()
If Check5.Caption = "No" Then
Check5.Value = 1
Check5.Caption = "Yes"
Clock5.Caption = MaskEdBox9.Text & " ON"
Clock5.Visible = True
ElseIf Check5.Caption = "Yes" Then
Check5.Value = 0
Check5.Caption = "No"
Clock5.Visible = False
End If
End Sub
Private Sub Check6_Click()
If Check6.Caption = "No" Then
Check6.Value = 1
Check6.Caption = "Yes"
Clock6.Caption = MaskEdBox11.Text & " ON"
Clock6.Visible = True
ElseIf Check6.Caption = "Yes" Then
Check6.Value = 0
Check6.Caption = "No"
Clock6.Visible = False
End If
End Sub
Private Sub Check7_Click()
If Check7.Caption = "No" Then
Check7.Value = 1
Check7.Caption = "Yes"
Clock7.Caption = MaskEdBox13.Text & " ON"
Clock7.Visible = True
ElseIf Check7.Caption = "Yes" Then
Check7.Value = 0
Check7.Caption = "No"
Clock7.Visible = False
End If
End Sub
Private Sub Check8_Click()
If Check8.Caption = "No" Then
Check8.Value = 1
Check8.Caption = "Yes"
Clock8.Caption = MaskEdBox15.Text & " ON"
Clock8.Visible = True
ElseIf Check8.Caption = "Yes" Then
Check8.Value = 0
Check8.Caption = "No"
Clock8.Visible = False
End If
End Sub
Private Sub Command1_Click()
If Command1.Caption = "Turn Sistem ON" Then
Command1.Caption = "Turn Sistem OFF"
Command2.Enabled = False
Command3.Enabled = False
SisON.Visible = True
SisOFF.Visible = False
Frame2.Enabled = True
Principal.Height = 8340
ElseIf Command1.Caption = "Turn Sistem OFF" Then
If ToggleButton1.Value = True Or ToggleButton2.Value = True Or ToggleButton3.Value = True Or ToggleButton4.Value = True Or ToggleButton5.Value = True Or ToggleButton6.Value = True Or ToggleButton7.Value = True Or ToggleButton8.Value = True Then
Command1.Caption = "Unlock Sistem"
SisLock.Visible = True
Frame2.Enabled = False
Principal.Height = 4155
Else
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command1.Caption = "Turn Sistem ON"
SisON.Visible = False
SisOFF.Visible = True
Frame2.Enabled = False
Principal.Height = 4155
End If
ElseIf Command1.Caption = "Unlock Sistem" Then
Frame7.Visible = True
SisLock.Visible = True
SisUnlock.Visible = True
Text2.Text = ""
Text2.SetFocus
Timer7.Enabled = True
Principal.Height = 8340
Else
End If
End Sub
Private Sub Command10_Click()
Text2.Text = Text2.Text & Command10.Caption
End Sub
Private Sub Command11_Click()
Text2.Text = Text2.Text & Command11.Caption
End Sub
Private Sub Command12_Click()
Text2.Text = Text2.Text & Command12.Caption
End Sub
Private Sub Command13_Click()
Text2.Text = Text2.Text & Command13.Caption
End Sub
Private Sub Command14_Click()
If Command3.Enabled = True Then
If Text2.Text = Text13.Text Then
Frame8.Visible = True
Frame7.Visible = False
Frame6.Enabled = False
Timer7.Enabled = False
Command1.SetFocus
Principal.Height = 8340
Else
Text2.Text = ""
Text2.SetFocus
Timer7.Enabled = True
Timer7.Enabled = False
Frame7.Visible = False
Command1.SetFocus
Principal.Height = 4155
End If
ElseIf Command3.Enabled = False Then
If Text2.Text = Text13.Text Then
Command1.Caption = "Turn Sistem OFF"
SisLock.Visible = False
SisUnlock.Visible = False
Timer7.Enabled = False
Frame7.Visible = False
Frame2.Enabled = True
Command1.SetFocus
Principal.Height = 8340
Else
Text2.Text = ""
Text2.SetFocus
Timer7.Enabled = True
Command1.SetFocus
Timer7.Enabled = False
Frame7.Visible = False
Principal.Height = 4155
End If
End If
End Sub
Private Sub Command15_Click()
Label1.Caption = Text3.Text
Label2.Caption = Text4.Text
Label3.Caption = Text5.Text
Label4.Caption = Text6.Text
Label5.Caption = Text7.Text
Label6.Caption = Text8.Text
Label7.Caption = Text9.Text
Label8.Caption = Text10.Text
Out1.Caption = Label1.Caption & " " & ToggleButton1.Caption
Out2.Caption = Label2.Caption & " " & ToggleButton2.Caption
Out3.Caption = Label3.Caption & " " & ToggleButton3.Caption
Out4.Caption = Label4.Caption & " " & ToggleButton4.Caption
Out5.Caption = Label5.Caption & " " & ToggleButton5.Caption
Out6.Caption = Label6.Caption & " " & ToggleButton6.Caption
Out7.Caption = Label7.Caption & " " & ToggleButton7.Caption
Out8.Caption = Label8.Caption & " " & ToggleButton8.Caption
Clock1.Caption = MaskEdBox1.Text & " ON"
Clock2.Caption = MaskEdBox3.Text & " ON"
Clock3.Caption = MaskEdBox5.Text & " ON"
Clock4.Caption = MaskEdBox7.Text & " ON"
Clock5.Caption = MaskEdBox9.Text & " ON"
Clock6.Caption = MaskEdBox11.Text & " ON"
Clock7.Caption = MaskEdBox13.Text & " ON"
Clock8.Caption = MaskEdBox15.Text & " ON"
Frame1.Enabled = True
Frame7.Enabled = True
Frame8.Visible = False
SisConfig.Visible = False
Principal.Height = 4155
End Sub
Private Sub Command2_Click()
SisExit.Visible = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub Command3_Click()
SisConfig.Visible = True
Frame7.Visible = True
Text2.Text = ""
Text2.SetFocus
Timer7.Enabled = True
Principal.Height = 8340
End Sub
Private Sub Command4_Click()
Text2.Text = Text2.Text & Command4.Caption
End Sub
Private Sub Command5_Click()
Text2.Text = Text2.Text & Command5.Caption
End Sub
Private Sub Command6_Click()
Text2.Text = Text2.Text & Command6.Caption
End Sub
Private Sub Command7_Click()
Text2.Text = Text2.Text & Command7.Caption
End Sub
Private Sub Command8_Click()
Text2.Text = Text2.Text & Command8.Caption
End Sub
Private Sub Command9_Click()
Text2.Text = Text2.Text & Command9.Caption
End Sub
Private Sub Form_Activate()
DlPortWritePortUchar "&H" & Text14.Text, Val(0)
Label1.Caption = Text3.Text
Label2.Caption = Text4.Text
Label3.Caption = Text5.Text
Label4.Caption = Text6.Text
Label5.Caption = Text7.Text
Label6.Caption = Text8.Text
Label7.Caption = Text9.Text
Label8.Caption = Text10.Text
Out1.Caption = Label1.Caption & " " & ToggleButton1.Caption
Out2.Caption = Label2.Caption & " " & ToggleButton2.Caption
Out3.Caption = Label3.Caption & " " & ToggleButton3.Caption
Out4.Caption = Label4.Caption & " " & ToggleButton4.Caption
Out5.Caption = Label5.Caption & " " & ToggleButton5.Caption
Out6.Caption = Label6.Caption & " " & ToggleButton6.Caption
Out7.Caption = Label7.Caption & " " & ToggleButton7.Caption
Out8.Caption = Label8.Caption & " " & ToggleButton8.Caption
Out1.Visible = True
Out2.Visible = True
Out3.Visible = True
Out4.Visible = True
Out5.Visible = True
Out6.Visible = True
Out7.Visible = True
Out8.Visible = True
If Check1.Value = 1 Then
Clock1.Caption = MaskEdBox1.Text & " ON"
Clock1.Visible = True
Else
End If
If Check2.Value = 1 Then
Clock2.Caption = MaskEdBox3.Text & " ON"
Clock2.Visible = True
Else
End If
If Check3.Value = 1 Then
Clock3.Caption = MaskEdBox5.Text & " ON"
Clock3.Visible = True
Else
End If
If Check4.Value = 1 Then
Clock4.Caption = MaskEdBox7.Text & " ON"
Clock4.Visible = True
Else
End If
If Check5.Value = 1 Then
Clock5.Caption = MaskEdBox9.Text & " ON"
Clock5.Visible = True
Else
End If
If Check6.Value = 1 Then
Clock6.Caption = MaskEdBox11.Text & " ON"
Clock6.Visible = True
Else
End If
If Check7.Value = 1 Then
Clock7.Caption = MaskEdBox13.Text & " ON"
Clock7.Visible = True
Else
End If
If Check8.Value = 1 Then
Clock8.Caption = MaskEdBox15.Text & " ON"
Clock8.Visible = True
Else
End If
SisOFF.Visible = True
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Command3.Enabled = True Then
If Text2.Text = Text13.Text Then
Frame8.Visible = True
Frame7.Visible = False
Frame6.Enabled = False
Timer7.Enabled = False
SisLock.Visible = False
Command1.SetFocus
Else
Text2.Text = ""
Text2.SetFocus
Timer7.Enabled = True
Command1.SetFocus
End If
ElseIf Command3.Enabled = False Then
If Text2.Text = Text13.Text Then
Command1.Caption = "Turn Sistem OFF"
Timer7.Enabled = False
Frame7.Visible = False
Frame2.Enabled = True
SisLock.Visible = False
SisUnlock.Visible = False
Command1.SetFocus
Else
Text2.Text = ""
Text2.SetFocus
Timer7.Enabled = True
Command1.SetFocus
End If
End If
Else
End If
End Sub
Private Sub Timer1_Timer()
Label20.Visible = True
End
End Sub
Private Sub Timer2_Timer()
Command1.Caption = "Turn Sistem ON"
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub Timer3_Timer()
Text12(0).Text = Time
End Sub
Private Sub Timer4_Timer()
Text11(0).Text = Date
End Sub
Private Sub Timer5_Timer()
If Check1.Value = 1 And MaskEdBox1.Text = Text12(0).Text Then
ToggleButton1.Value = True
ToggleButton1.BackColor = &HFF00&
ToggleButton1.Caption = "ON"
Led1.Picture = led_green.Picture
SisON.Visible = True
SisOFF.Visible = False
Out1.Caption = Label1.Caption & " ON"
Out1.BackColor = &HC00000
Out1.ForeColor = &HFF00&
Clock1.Caption = MaskEdBox2.Text & " OFF"
Clock1.BackColor = &HC00000
Clock1.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check1.Value = 1 And MaskEdBox2.Text = Text12(0).Text Then
ToggleButton1.Value = False
ToggleButton1.BackColor = &H8000000F
ToggleButton1.Caption = "OFF"
Led1.Picture = led_gray.Picture
Out1.Caption = Label1.Caption & " OFF"
Out1.BackColor = &HFF00&
Out1.ForeColor = &HC00000
Clock1.Caption = MaskEdBox1.Text & " ON"
Clock1.BackColor = &HFF00&
Clock1.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check2.Value = 1 And MaskEdBox3.Text = Text12(0).Text Then
ToggleButton2.Value = True
ToggleButton2.BackColor = &HFF00&
ToggleButton2.Caption = "ON"
Led2.Picture = led_green.Picture
SisON.Visible = True
SisOFF.Visible = False
Out2.Caption = Label2.Caption & " ON"
Out2.BackColor = &HC00000
Out2.ForeColor = &HFF00&
Clock2.Caption = MaskEdBox4.Text & " OFF"
Clock2.BackColor = &HC00000
Clock2.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check2.Value = 1 And MaskEdBox4.Text = Text12(0).Text Then
ToggleButton2.Value = False
ToggleButton2.BackColor = &H8000000F
ToggleButton2.Caption = "OFF"
Led2.Picture = led_gray.Picture
Out2.Caption = Label2.Caption & " OFF"
Out2.BackColor = &HFF00&
Out2.ForeColor = &HC00000
Clock2.Caption = MaskEdBox3.Text & " ON"
Clock2.BackColor = &HFF00&
Clock2.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check3.Value = 1 And MaskEdBox5.Text = Text12(0).Text Then
ToggleButton3.Value = True
ToggleButton3.BackColor = &HFF00&
ToggleButton3.Caption = "ON"
SisON.Visible = True
SisOFF.Visible = False
Led3.Picture = led_green.Picture
Out3.Caption = Label3.Caption & " ON"
Out3.BackColor = &HC00000
Out3.ForeColor = &HFF00&
Clock3.Caption = MaskEdBox6.Text & " OFF"
Clock3.BackColor = &HC00000
Clock3.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check3.Value = 1 And MaskEdBox6.Text = Text12(0).Text Then
ToggleButton3.Value = False
ToggleButton3.BackColor = &H8000000F
ToggleButton3.Caption = "OFF"
Led3.Picture = led_gray.Picture
Out3.Caption = Label3.Caption & " OFF"
Out3.BackColor = &HFF00&
Out3.ForeColor = &HC00000
Clock3.Caption = MaskEdBox5.Text & " ON"
Clock3.BackColor = &HFF00&
Clock3.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check4.Value = 1 And MaskEdBox7.Text = Text12(0).Text Then
ToggleButton4.Value = True
ToggleButton4.BackColor = &HFF00&
ToggleButton4.Caption = "ON"
SisON.Visible = True
SisOFF.Visible = False
Led4.Picture = led_green.Picture
Out4.Caption = Label4.Caption & " ON"
Out4.BackColor = &HC00000
Out4.ForeColor = &HFF00&
Clock4.Caption = MaskEdBox8.Text & " OFF"
Clock4.BackColor = &HC00000
Clock4.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check4.Value = 1 And MaskEdBox8.Text = Text12(0).Text Then
ToggleButton4.Value = False
ToggleButton4.BackColor = &H8000000F
ToggleButton4.Caption = "OFF"
Led4.Picture = led_gray.Picture
Out4.Caption = Label4.Caption & " OFF"
Out4.BackColor = &HFF00&
Out4.ForeColor = &HC00000
Clock4.Caption = MaskEdBox7.Text & " ON"
Clock4.BackColor = &HFF00&
Clock4.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check5.Value = 1 And MaskEdBox9.Text = Text12(0).Text Then
ToggleButton5.Value = True
ToggleButton5.BackColor = &HFF00&
ToggleButton5.Caption = "ON"
SisON.Visible = True
SisOFF.Visible = False
Led5.Picture = led_green.Picture
Out5.Caption = Label5.Caption & " ON"
Out5.BackColor = &HC00000
Out5.ForeColor = &HFF00&
Clock5.Caption = MaskEdBox10.Text & " OFF"
Clock5.BackColor = &HC00000
Clock5.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check5.Value = 1 And MaskEdBox10.Text = Text12(0).Text Then
ToggleButton5.Value = False
ToggleButton5.BackColor = &H8000000F
ToggleButton5.Caption = "OFF"
Led5.Picture = led_gray.Picture
Out5.Caption = Label5.Caption & " OFF"
Out5.BackColor = &HFF00&
Out5.ForeColor = &HC00000
Clock5.Caption = MaskEdBox9.Text & " ON"
Clock5.BackColor = &HFF00&
Clock5.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check6.Value = 1 And MaskEdBox11.Text = Text12(0).Text Then
ToggleButton6.Value = True
ToggleButton6.BackColor = &HFF00&
ToggleButton6.Caption = "ON"
SisON.Visible = True
SisOFF.Visible = False
Led6.Picture = led_green.Picture
Out6.Caption = Label6.Caption & " ON"
Out6.BackColor = &HC00000
Out6.ForeColor = &HFF00&
Clock6.Caption = MaskEdBox12.Text & " OFF"
Clock6.BackColor = &HC00000
Clock6.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check6.Value = 1 And MaskEdBox12.Text = Text12(0).Text Then
ToggleButton6.Value = False
ToggleButton6.BackColor = &H8000000F
ToggleButton6.Caption = "OFF"
Led6.Picture = led_gray.Picture
Out6.Caption = Label6.Caption & " OFF"
Out6.BackColor = &HFF00&
Out6.ForeColor = &HC00000
Clock6.Caption = MaskEdBox11.Text & " ON"
Clock6.BackColor = &HFF00&
Clock6.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check7.Value = 1 And MaskEdBox13.Text = Text12(0).Text Then
ToggleButton7.Value = True
ToggleButton7.BackColor = &HFF00&
ToggleButton7.Caption = "ON"
SisON.Visible = True
SisOFF.Visible = False
Led7.Picture = led_green.Picture
Out7.Caption = Label7.Caption & " ON"
Out7.BackColor = &HC00000
Out7.ForeColor = &HFF00&
Clock7.Caption = MaskEdBox14.Text & " OFF"
Clock7.BackColor = &HC00000
Clock7.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check7.Value = 1 And MaskEdBox14.Text = Text12(0).Text Then
ToggleButton7.Value = False
ToggleButton7.BackColor = &H8000000F
ToggleButton7.Caption = "OFF"
Led7.Picture = led_gray.Picture
Out7.Caption = Label7.Caption & " OFF"
Out7.BackColor = &HFF00&
Out7.ForeColor = &HC00000
Clock7.Caption = MaskEdBox13.Text & " ON"
Clock7.BackColor = &HFF00&
Clock7.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
If Check8.Value = 1 And MaskEdBox15.Text = Text12(0).Text Then
ToggleButton8.Value = True
ToggleButton8.BackColor = &HFF00&
ToggleButton8.Caption = "ON"
SisON.Visible = True
SisOFF.Visible = False
Led8.Picture = led_green.Picture
Out8.Caption = Label8.Caption & " ON"
Out8.BackColor = &HC00000
Out8.ForeColor = &HFF00&
Clock8.Caption = MaskEdBox16.Text & " OFF"
Clock8.BackColor = &HC00000
Clock8.ForeColor = &HFF00&
Timer6.Enabled = True
Control
ElseIf Check8.Value = 1 And MaskEdBox16.Text = Text12(0).Text Then
ToggleButton8.Value = False
ToggleButton8.BackColor = &H8000000F
ToggleButton8.Caption = "OFF"
Led8.Picture = led_gray.Picture
Out8.Caption = Label8.Caption & " OFF"
Out8.BackColor = &HFF00&
Out8.ForeColor = &HC00000
Clock8.Caption = MaskEdBox15.Text & " ON"
Clock8.BackColor = &HFF00&
Clock8.ForeColor = &HC00000
Timer6.Enabled = True
Control
End If
End Sub
Private Sub Timer6_Timer()
If Command1.Caption = "Turn Sistem ON" Then
SisLock.Visible = True
Command1.Caption = "Unlock Sistem"
Command2.Enabled = False
Command3.Enabled = False
Timer6.Enabled = False
ElseIf Command1.Caption = "Turn Sistem OFF" Then
Text1.Text = "Sistem ON"
Timer6.Enabled = False
ElseIf Command1.Caption = "Unlock Sistem" Then
SisLock.Visible = True
Timer6.Enabled = False
Else
End If
End Sub
Private Sub Timer7_Timer()
Frame7.Visible = False
Timer7.Enabled = False
SisUnlock.Visible = False
SisConfig.Visible = False
Principal.Height = 4155
End Sub
Private Sub Timer8_Timer()
End
End Sub
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
ToggleButton1.BackColor = &HFF00&
ToggleButton1.Caption = "ON"
Led1.Picture = led_green.Picture
Out1.Caption = Label1.Caption & " ON"
Out1.BackColor = &HC00000
Out1.ForeColor = &HFF00&
Control
ElseIf ToggleButton1.Value = False Then
ToggleButton1.BackColor = &H8000000F
ToggleButton1.Caption = "OFF"
Led1.Picture = led_gray.Picture
Out1.Caption = Label1.Caption & " OFF"
Out1.BackColor = &HFF00&
Out1.ForeColor = &HC00000
Control
End If
End Sub
Private Sub ToggleButton2_Click()
If ToggleButton2.Value = True Then
ToggleButton2.BackColor = &HFF00&
ToggleButton2.Caption = "ON"
Led2.Picture = led_green.Picture
Out2.Caption = Label2.Caption & " ON"
Out2.BackColor = &HC00000
Out2.ForeColor = &HFF00&
Control
ElseIf ToggleButton2.Value = False Then
ToggleButton2.BackColor = &H8000000F
ToggleButton2.Caption = "OFF"
Led2.Picture = led_gray.Picture
Out2.Caption = Label2.Caption & " OFF"
Out2.BackColor = &HFF00&
Out2.ForeColor = &HC00000
Control
End If
End Sub
Private Sub Control()
If ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(0)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(1)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(2)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(3)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(4)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(5)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(6)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(7)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(8)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(9)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(10)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(11)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(12)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(13)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(14)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(15)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(16)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(17)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(18)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(19)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(20)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(21)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(22)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(23)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(24)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(25)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(26)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(27)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(28)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(29)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(30)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(31)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(32)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(33)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(34)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(35)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(36)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(37)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(38)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(39)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(40)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(41)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(42)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(43)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(44)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(45)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(46)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(47)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(48)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(49)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(50)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(51)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(52)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(53)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(54)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(55)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(56)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(57)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(58)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(59)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(60)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(61)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(62)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(63)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(64)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(65)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(66)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(67)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(68)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(69)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(70)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(71)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(72)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(73)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(74)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(75)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(76)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(77)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(78)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(79)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(80)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(81)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(82)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(83)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(84)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(85)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(86)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(87)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(88)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(89)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(90)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(91)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(92)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(93)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(94)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(95)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(96)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(97)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(98)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(99)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(100)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(101)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(102)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(103)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(104)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(105)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(106)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(107)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(108)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(109)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(110)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(111)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(112)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(113)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(114)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(115)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(116)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(117)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(118)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(119)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(120)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(121)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(122)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(123)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(124)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(125)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(126)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = False Then
DlPortWritePortUchar "&H" & Text14.Text, Val(127)
Else
control1
End If
End Sub
Private Sub control1()
If ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(128)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(129)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(130)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(131)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(132)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(133)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(134)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(135)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(136)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(137)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(138)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(139)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(140)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(141)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(142)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(143)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(144)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(145)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(146)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(147)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(148)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(149)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(150)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(151)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(152)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(153)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(154)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(155)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(156)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(157)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(158)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(159)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(160)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(161)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(162)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(163)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(164)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(165)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(166)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(167)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(168)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(169)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(170)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(171)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(172)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(173)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(174)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(175)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(176)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(177)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(178)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(179)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(180)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(181)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(182)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(183)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(184)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(185)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(186)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(187)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(188)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(189)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(190)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = False And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(191)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(192)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(193)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(194)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(195)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(196)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(197)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(198)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(199)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(200)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(201)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(202)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(203)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(204)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(205)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(206)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(207)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(208)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(209)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(210)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(211)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(212)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(213)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(214)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(215)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(216)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(217)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(218)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(219)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(220)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(221)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(222)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = False And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(223)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(224)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(225)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(226)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(227)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(228)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(229)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(230)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(231)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(232)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(233)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(234)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(235)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(236)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(237)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(238)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = False And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(239)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(240)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(241)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(242)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(243)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(244)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(245)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(246)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = False And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(247)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(248)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(249)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(250)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = False And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(251)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(252)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = False And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(253)
ElseIf ToggleButton1.Value = False And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(254)
ElseIf ToggleButton1.Value = True And ToggleButton2.Value = True And ToggleButton3.Value = True And ToggleButton4.Value = True And ToggleButton5.Value = True And ToggleButton6.Value = True And ToggleButton7.Value = True And ToggleButton8.Value = True Then
DlPortWritePortUchar "&H" & Text14.Text, Val(255)
End If
End Sub
Private Sub ToggleButton3_Click()
If ToggleButton3.Value = True Then
ToggleButton3.BackColor = &HFF00&
ToggleButton3.Caption = "ON"
Led3.Picture = led_green.Picture
Out3.Caption = Label3.Caption & " ON"
Out3.BackColor = &HC00000
Out3.ForeColor = &HFF00&
Control
ElseIf ToggleButton3.Value = False Then
ToggleButton3.BackColor = &H8000000F
ToggleButton3.Caption = "OFF"
Led3.Picture = led_gray.Picture
Out3.Caption = Label3.Caption & " OFF"
Out3.BackColor = &HFF00&
Out3.ForeColor = &HC00000
Control
End If
End Sub
Private Sub ToggleButton4_Click()
If ToggleButton4.Value = True Then
ToggleButton4.BackColor = &HFF00&
ToggleButton4.Caption = "ON"
Led4.Picture = led_green.Picture
Out4.Caption = Label4.Caption & " ON"
Out4.BackColor = &HC00000
Out4.ForeColor = &HFF00&
Control
ElseIf ToggleButton4.Value = False Then
ToggleButton4.BackColor = &H8000000F
ToggleButton4.Caption = "OFF"
Led4.Picture = led_gray.Picture
Out4.Caption = Label4.Caption & " OFF"
Out4.BackColor = &HFF00&
Out4.ForeColor = &HC00000
Control
End If
End Sub
Private Sub ToggleButton5_Click()
If ToggleButton5.Value = True Then
ToggleButton5.BackColor = &HFF00&
ToggleButton5.Caption = "ON"
Led5.Picture = led_green.Picture
Out5.Caption = Label5.Caption & " ON"
Out5.BackColor = &HC00000
Out5.ForeColor = &HFF00&
Control
ElseIf ToggleButton5.Value = False Then
ToggleButton5.BackColor = &H8000000F
ToggleButton5.Caption = "OFF"
Led5.Picture = led_gray.Picture
Out5.Caption = Label5.Caption & " OFF"
Out5.BackColor = &HFF00&
Out5.ForeColor = &HC00000
Control
End If
End Sub
Private Sub ToggleButton6_Click()
If ToggleButton6.Value = True Then
ToggleButton6.BackColor = &HFF00&
ToggleButton6.Caption = "ON"
Led6.Picture = led_green.Picture
Out6.Caption = Label6.Caption & " ON"
Out6.BackColor = &HC00000
Out6.ForeColor = &HFF00&
Control
ElseIf ToggleButton6.Value = False Then
ToggleButton6.BackColor = &H8000000F
ToggleButton6.Caption = "OFF"
Led6.Picture = led_gray.Picture
Out6.Caption = Label6.Caption & " OFF"
Out6.BackColor = &HFF00&
Out6.ForeColor = &HC00000
Control
End If
End Sub
Private Sub ToggleButton7_Click()
If ToggleButton7.Value = True Then
ToggleButton7.BackColor = &HFF00&
ToggleButton7.Caption = "ON"
Led7.Picture = led_green.Picture
Out7.Caption = Label7.Caption & " ON"
Out7.BackColor = &HC00000
Out7.ForeColor = &HFF00&
Control
ElseIf ToggleButton7.Value = False Then
ToggleButton7.BackColor = &H8000000F
ToggleButton7.Caption = "OFF"
Led7.Picture = led_gray.Picture
Out7.Caption = Label7.Caption & " OFF"
Out7.BackColor = &HFF00&
Out7.ForeColor = &HC00000
Control
End If
End Sub
Private Sub ToggleButton8_Click()
If ToggleButton8.Value = True Then
ToggleButton8.BackColor = &HFF00&
ToggleButton8.Caption = "ON"
Led8.Picture = led_green.Picture
Out8.Caption = Label8.Caption & " ON"
Out8.BackColor = &HC00000
Out8.ForeColor = &HFF00&
Control
ElseIf ToggleButton8.Value = False Then
ToggleButton8.BackColor = &H8000000F
ToggleButton8.Caption = "OFF"
Led8.Picture = led_gray.Picture
Out8.Caption = Label8.Caption & " OFF"
Out8.BackColor = &HFF00&
Out8.ForeColor = &HC00000
Control
End If
End Sub
'FORM KISMI BİTTİ
'MODÜL KISMI
Public Declare Sub DlPortWritePortUchar Lib "dlportio.dll" (ByVal Port As Long, ByVal Value As Byte)
Public Declare Sub DlPortWritePortUshort Lib "dlportio.dll" (ByVal Port As Long, ByVal Value As Integer)
Public Declare Sub DlPortWritePortUlong Lib "dlportio.dll" (ByVal Port As Long, ByVal Value As Long)
'MODÜL BİTTİ
KAYNAK : www.pscode.com
LPT PORT CONTROL
hadi kolay gelsin....
arkadaşım yardımın için saol da bu sayfada senin gönderdiğin dökümanları bulamadım.