media player problem

pajo

New member
Joined
Nov 23, 2008
Messages
1
Programming Experience
Beginner
Hi, I want to integrate AxWindowsMediaPlayer into VB2008, and I have problem.
this is part of my code:

VB.NET:
...
                AxWindowsMediaPlayer2.URL = "c:\temp\bugelm.wav"
                AxWindowsMediaPlayer2.Ctlcontrols.play()                      'line 18
          Do While ProgressBar2.Value < ProgressBar2.Maximum
                If ProgressBar1.Value = ProgressBar1.Maximum Then
                    For i As Integer = 1 To 10
                        ProgressBar1.Increment(-i)
                        Sleep(60)
                        ProgressBar2.Increment(i)
                        Sleep(100)
                    Next i
....

and the problem is that play dosen't start after line 18...so Do While loop is executed, and after Do-While loop is over, wav file starts to play.
So my question is, are there any way to pause execution of program until this wav file is loaded, and starts to play.
I allready tried to make another function in which I placed do-while code, and I have called after line 18, but with no luck.

Pls if anyone could help, it is very important
 
it is always.. .Net problem like when u wants to loop something and before u have execute something never executes before than loop..

its actually happens step by step bt when execution comes to loop function it become hanged until the loop solves.. i tried for 2 days for this type of problem bt can't find any solution..

it also happen on you want to show a progress bar bt before u want to show a label.. it never show before the loop finishes ..

so all i have .. if any one have any idea.. then its also good for me
 
Back
Top