Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • *Experts*
Posted
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.
Posted

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

Posted
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
  • *Experts*
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...