To make a small line flashing I use the following code
For j=1 To 4
If j=1 OR j=3 Then co=Colors.black Else co=Colors.white
Canvas.DrawLine(x1,y1,x2,y2,co,5)
pnl. invalidate
t= DateTime.Now+500
Do While DateTime.Now <t
Loop
next
it seems to work correctly when using the debugger turning the white color on and off with a waiting time of 500, but when running the program I only see the final white color despite I have changed the waiting time between flashes to very diferent values (from 50 to 5000).
Do you know how to do it.