By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,095 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,095 IT Pros & Developers. It's quick & easy.

Media player code???

P: 2
hey guys first off i love what you are doing with the site!!!

You guys are awesome

Hey i want to put windows media play in a form with a web browser in it.

I have the com component from C:\windows (see picture)


so i have this code...
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  3. WebBrowser1.Navigate(TextBox1.Text) 
  4. End Sub
  5.  
  6. Private Sub Textbox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
  7. If e.KeyCode = Keys.Enter Then
  8. WebBrowser1.Navigate(TextBox1.Text)
  9. End If
  10. End Sub
  11. Private Sub AxWindowsMediaPlayer1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxWindowsMediaPlayer1.Enter
  12. Dim sAudio As New Microsoft.VisualBasic.Devices.Audio()
  13. sAudio.Play("C:\Documents and Settings\church\My Documents\My Games\Oblivion\New Folder 1\70's - pilot - oh oh its magic (happy gilmore soundtrack).wav")
  14. End Sub
  15. End Class
when i hit the play key on the player... it plays...

however, i can't get it to stop, or to seek throughout the track, or to increase or decrease volume...

plus could i get multiple tracks to line up behind it??? (like a playlist)

Thanks guys. Any help would be much obliged...

Thank You
Mar 14 '07 #1
Share this Question
Share on Google+
2 Replies


knychtell
P: 65
hi, if you want to stop the axmediaplayer just add a btn in menu or a form then
add this code
im not quite sure but it's either , close or stop
axmediaplayer.stop
or axmediaplayer=stop
i hope this makes sense....
Mar 15 '07 #2

P: 2
i need full function out of the control.

thanks though...

but can anyone else help me
Mar 15 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.