cdoverlaw Posted October 26, 2003 Posted October 26, 2003 how do i use the windows media player 9 component to open media files, what code is required to open the music files, This is currently my current open code Private Sub MenuItem1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click OpenFileDialog1.ShowDialog() 'display Open dialog box If OpenFileDialog1.FileName <> "" Then Try FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input) Catch MsgBox("Error opening file.") Finally FileClose(1) 'close file End Try End If End Sub Jonathan Quote
*Experts* Volte Posted October 26, 2003 *Experts* Posted October 26, 2003 That doesn't do much. That opens the file for text input, which will do you no good with a media file. I suggest you look at the [api]mciSendString[/api] API for doing things like this. Using the Media Player control - especially in .NET where COM Interop is needed to make it work - adds excessive overhead. Quote
cdoverlaw Posted October 26, 2003 Author Posted October 26, 2003 i want to use the media player control, i just need to know how to get the files to open in it, i have my reasons why i want to use the media player control, you will see this when i update my open source project with the latest source jonathan Quote
*Experts* Volte Posted October 26, 2003 *Experts* Posted October 26, 2003 You could try setting the URL property. Quote
cdoverlaw Posted October 26, 2003 Author Posted October 26, 2003 thanks, another module of my project is now complete :D, i need someone to help me to get the program to dock to the side of windows and then i will make the project completly open source Quote
*Experts* Volte Posted October 26, 2003 *Experts* Posted October 26, 2003 Look at the [api]SHAppBarMessage[/api] API. Be warned though, it's fairly to make work well, and I couldn't get it to work right in .NET at all. Quote
cdoverlaw Posted October 26, 2003 Author Posted October 26, 2003 i dont know how to use api's :( Jonathan Quote
*Experts* Volte Posted October 26, 2003 *Experts* Posted October 26, 2003 [mshelp]ms-help://MS.VSCC/MS.MSDNVS/vbcn7/html/vaconCallingWindowsAPIs.htm[/mshelp] Quote
cdoverlaw Posted October 26, 2003 Author Posted October 26, 2003 hmm, i realy need help with this, anyone able to help me ova msn messenger, my adress is jon@rawserve.com Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.