- N31 dòng khai bâo sử dụng hăm lựa chọn biến mode biến mode năy
DimJ As Long
Dim h, h1 As Long Dim b_ dung As Boolean Dim m As String
Dim n As Long
Dim AI, A2 As Long
Dim x, y Âs Double
'ket thuc khai bao cac bien tao xung Private Sub Commandl_ ClickQ
Dim GIATRIX, GIATRIY, GIATRIZ, GIATRIR As String Dim VTX, VTY, VTZ, VTG, i, t1, t2, t3, t4, t5, Chon As Long Dim VTX, VTY, VTZ, VTG, i, t1, t2, t3, t4, t5, Chon As Long
For i = 8 To List1.ListCount - 4 VTG = InStr(List1.List(), "G") VTX = InStr(Lst1.List(), "X") VTY = InStr(List1.List(), "Y")
'VTZ = InStr(List1.List(), "Z") VTR =InStr(Listl.List(), "R") IfVTG = 0 Then tl =0 Else tl =l6 End If IfVTX = 0 Then t2=0 Else 2=8 End If If VTY = 0 Then t3=0 —_
SVTH: Dương Văn Toản - Dương Phú Tđn 65
Khoa Cơ khi Tự Động & Robot Đồ Ân Tốt Nghiệp Else t3=4 End If If VTZ.= 0 Then t4=0 Else t4=2 End If IfVTR = 0 Then tẤ=0 Else tS=1 End If Chon = t1 +t2 +t3 + t4 +t§
Iƒ Chon =31 Then
GIATRIG = Val(Mid(List1.List4), VTG + 1)) GIATRIX = Val(Mid(List1.Listô), VTX + 1)) GIATRIY = Val(Mid(List1.List(), VTY + 1)) GIATRI42 = Val(Mid(List1.List(), VTZ + 1)) GIATRIR = Val(Mid(List1.List(), VTR + 1)) List2.Addltem GIA TR]G List3.AddItem GIATRIX List4.AddItem GIATRIY List5.AddItem GIATRIZ. L1Ist6.AddItem GIATRIR Elself Chon = 30 Then
GIATRIG = Val(Mid(List1.List), VTG + 1)) GIATRIX = Val(Mid(List1.List(), VTX + 1)) GIATRIY = Val(Mid(List1.List), VTY + 1)) GIATRIZ = Val(Mid(List1.List(), VTZ + 1)) L¡ist2.Addltem GIATRIG List3.AddIltem GIATRIX List4.AddItem GIATRIY List5.AddItem GIATRI⁄Z List6.A ddItem "0"
Elself Chon = 29 Then
GIATRIG = Val(Mid(List1.List(0), VTG + 1)) GIATRIX = Val(Mid(List1.Listô), VTX + 1)) GIATRIY = Val(Mid(List1.Listô), VTY + l)) GIATRIR = Val(Mid(L¡st1.List0), VTR + 1)) List2.AddIltem GIATRIG
_—T===——==—=——ẽễẺỄễỄỄễễễễễễễễễễễễ____________—____—_ ——_
SVTH: Dương Văn Toăn - Dương Phú Tđn 66
Khóa: 2004 - 2009
Khoa Cơ khi Tự Động & Robot Đồ Ân Tết Nghiệ —————-—___ˆ^: `
List3.AddlItem GIA TRIX List4.AddItem GIATRIY List5.Addltem "0"
List6.AddItem GIATRIR. Elself Chon = 28 Then
GIATRIG = Val(Mid(List1.List(i), VTG + 1)) GIATRIX = Val(Mid(List1.List(ô), VTX + 1) GIATRIY = Val(Mid(List1.List(1), VTY + 1)) List2.AddItem GIATRIG
List3.Addltem GIATRIX
List4.AddÏltem GIATRIY List5.AddItem "0"
List6.Addltem "0" Elself Chon = 27 Then
GIATRIG = Val(Mid(List1.List(), VTG + 1)) GIATRIX = Val(Mid(List1.List(), VTX + 1)) GIATRIZ = Val(Mid(List1.List(), VTZ + 1)) GIATRIR = Val(Mid(List1.List(), VTR + 1) List2.Addltem GIA TRỊG
List3.Addltem GIA TRIX List4.AddItem GIATRIY List5.Addltem GIATRIZ. - List6.AddItenm GIATRIR. Elself Chon = 26 Then
GIATRIG = Val(Mid(List1.List(i), VTG + 1)) GIATRIX = Val(Mid(List1.List(), VTX + 1)) GIATRIZ = Val(Mid(List1.List(), VTZ + 1)) List2.AddIltem GIATRIG List3.Addltem GIATRIX List4.Addltem GIATRIY List5.AddItem GLATR1⁄Z List6.Addltem "0"
Elself Chon = 25 Then
- GIATRIG = Val(Mid(List1.List(), VTG + 1))
GIATRIX = Val(Mid(List1.List(ï), VTX + 1)) GIATRIR = Val(Mid(List1.List(ô), VTR + 1)) List2.AddItem GIA TRTỊG
List3.AddItem GIA TRIX List4.AddIltem GIATRIY List5.Addltem "0"
List6.AddItem GIATRIR
mi
SŠVTH: Đương Văn Toăn - Dương Phú Tđn G
1
Khoa Cơ khi Tự Động & Robot Đồ Ân Tốt Nghiệp Elself Chon = 24 Then
GIATRIG = Val(Mid(List1.List), VTG + 1)) GIATRIX = Val(Mid(List1.List(), VTX + 1)) L¡ist2.AddItem GIA TRIG
List3.AddIltem GIATRIX List4.AddItem GIATRIY List5.Addltem "0"
List6.Addltem "0" Elself Chon = 23 Then
GIATRIG = Val(Mid(List1.List(), VTG + 1)) GIATRIY = Val(Mid(List1.List(), VTY + 1)) GIATRIZ = Val(Mid(List1.List(), VTZ + 1)) GIATRIR = Val(Mid(List1.List(), VTR + 1)) List2.AddItem GIATRIG L¡st3.AddItem GIATRIX List4.AddItem GIATRỊY List5.AddItem GIATRIZ Lst6.Addltem GIATRIR Elself Chon = 22 Then
GIATRIG = Val(Mid(L¡ist1.List(), VTG + 1)) GIATRIY = Val(Mid(List1.List(), VTY + 1)) GIATRIZ = Val(Mid(List1.List), VTZ + 1)) List2.AddIltem GLATRIG List3.AddIltem GIATRIX List4.AddItem GIATRIY ListŠ5.AddItem GIATRIZ List6.Addltem "0"
Elself Chon = 21 Then
GIATRIG = Val(Mid(L1st1.List), VTG + 1)) GIATRIY = Val(Mid(List1.List(), VTY + 1))