Bonjour,
dans mon code j'ai un do : loop qui attend soit un chagement dans un registre du port parallele ou qu'une variable (booleen) change.
lorsqu'une des condition est vrai ma loop ce terminer..
le problème est que lorsque j'entre dans ma loop, mon appli. ne répond plus, je ne peut plus appuyer sur aucun bouton etc... mais ma loop voit les changement dans le port parallele est ce terminer..sans redonner les controls a mon appli..
Private Sub wait_for_action()
Timer_showOffre.Enabled = True
Dim byte1, byte2
Do:
DoEvents
byte1 = read_Data(0)
byte2 = read_Data(1)
'Flash une shape
If mainForm.shpFlasher.BackColor = &HFF& Then
mainForm.shpFlasher.BackColor = &HFF00&
Else
mainForm.shpFlasher.BackColor = &HFF&
End If
'-----------------------
If byte1 = "1" Then
mainForm.shpFlasher.BackColor = &HFF00&
Exit Do
Else
If byte2 = 1 Then
mainForm.shpFlasher.BackColor = &HFF&
lstOffre.AddItem actualOffre
Exit Do
Else
End If
End If
Loop Until lquit = True
If lquit = True Then
mainForm.shpFlasher.BackColor = &H8000000F
lquit = False
Else
End If
End Sub
merci!