Hi!
I'm a newbie in this community.
I am developing a VB6 app which displays 100 pictures one at a time at random using a button click event. This works fine so far. Using the same random number generated to display the picture using a ' select case' routine, it needs to play a wave file representing a question for that picture using the mmcontrol1 play button. This is then followed with playing an answer using the mmcontrol2 play button
I am using mmcontrol1 for playing the question and mmcontrol2 for the answer.
The problem is this; When the random number has caused a picture and wave file to be executed,it will continue to work fine until the current random number is a number that has already been used once before. When this happens the picture displays correctly but the sound file does not play.
How can I trap this and correct it.

Try to close your media player and then reload the wave file -

MM1.Close

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.