I'm using mciSendString to play a media file inside my form, however I'd like to be able to hide the form after the media has finished playing as well as showing the playing time of the video. Is there a way I can get the playing time of the media file and get an event raised when it finishes playing? I don't want to add another dependency in the form of the WMP component.
I found some code via google, but I can't make heads or tails of it. I don't have much experience with APIs but from what I tried it only returned zero. Here it is:
Code:Function MCIWndGetLength (hwnd As HWND) As Long MCIWndGetLength = SendMessage(hwnd, MCIWNDM_GETLENGTH, 0, 0) End Function 'Found on http://translate.google.co.uk/translate?hl=en&sl=ja&u=http://www.activebasic.com/forum/viewtopic.php%3Fp%3D9024&sa=X&oi=translate&resnum=10&ct=result&prev=/search%3Fq%3DMCIWndGetLength%2B.Net%26start%3D10%26hl%3Den%26lr%3Dlang_en%26sa%3DN%26as_qdr%3Dall





Reply With Quote