I have a program that has a PictureBox (Time Machine) that moves alolng the width of a Panel (Time Line). I need the Panel to flash while the picture is moving.
The problem is the Panel only starts flashing after the picture has finished moving. How do I get both to occur at the same time?
That's a tough one. One of the problems Visual Basic has is that it doesn't handle asynchronous actions very well. Access VBA has a DoEvents command that you can use to allow background processes and user interaction to run while a process is in progress. I'd have to play with your project to tell you for sure how to get that to work.
One hacky way could be to be swap the panel with an image, make it a gif that flashes, then swap it back to a solid pic at the end, that way you only have to handle the movement of PictureBox
Thanks. Definatley something I need to practice. In the mean time I have decided to simply change the backcolor of the panel and play a wav file for the duration of the movement which I think actually works and looks a lot better.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.