Quote Originally Posted by jmsrickland View Post
GCGraficControl.Delay = Asc(Mid$(strFrame, 5, 2)) * 10

That is not correct. You can not convert 2 bytes to an ascii value; only one byte can be converted to ascii.

Note that the delay value is 2 bytes and it is in Little Endian order which means the LSD is in the first byte and the MSD is in the 2nd byte.

For example - assume Mid$(strFrame, 5, 2) has the following values:

Code:
 Byte Byte
  5    6
 LSD  MSD
+----+----+
| 04 | 01 |
+----+----+
You need to convert each byte to ascii and then switch the two byes around so that you wind up with MSD LSD order instead of LSD MSD order.

So, 0401 should be switched around to 0104. Below is what you need to get the true value:

GCGraficControl.Delay = Asc(Mid(strFrame, 5, 1)) + Asc(Mid(strFrame, 6, 1)) * 256

Also, the value is in 1/100th not 1/10th

GCGraficControl.Delay = GCGraficControl.Delay * 100

To do this in one statement you do the following:

GCGraficControl.Delay = (Asc(Mid(strFrame, 5, 1)) + Asc(Mid(strFrame, 6, 1)) * 256) * 100
why the Delay isn't so easy to catch like image size?
(anotherthing: if i put the "kill "filename"" in loop, don't works, but outside of loop works... only i for catch some interesting errors lol)