Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21271

Calculating progress speed using byte count of data

$
0
0
I hope I can explain this well enough but here is my problem.

I am using two pictureboxes to show the progress of a sound as it is being played. Picture2 is the background that holds an image in it. It does not move. Picture1 is sitting on top of Picture2 (not in Picture2 like a Child) and it is to move from left to right until it's left border has moved all the way to the right border of Picture2 thus exposing the image underneath it.

I know how many bytes of data are in the sound file and as the sound is being played I can capture the number of bytes that have been played using a Timer event.

I need to take the number of bytes already played and using that calculate how much movement should be applied to Picture1 so it moves right a certain amount of distance and it will have moved all the way to the right when the return value of bytes played is equal to the number of bytes in the sound file.

Viewing all articles
Browse latest Browse all 21271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>