473,657 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Media player code???

2 New Member
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
2 1842
knychtell
65 New Member
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.s top
or axmediaplayer=s top
i hope this makes sense....
Mar 15 '07 #2
Eukanuba863
2 New Member
i need full function out of the control.

thanks though...

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

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

Similar topics

0
2065
by: Mickel Grönroos | last post by:
Hi! Anybody tried using Windows Media Player 9 via win32com? (And more precisely, combining that with a Tkinter application.) I found a few earlier threads on Windows Media Player and Python, but it seems nobody has really got it to work, e.g. the below does not work: wmp = win32com.client.Dispatch("MediaPlayer.MediaPlayer.1") wmp.FileName = "C:/Path/To/Some/Media/File.wav"
1
7886
by: Stephen Adam | last post by:
Hi there, Have spent a while trying to find out how to connect to Windows Media Player through COM. Unfortunately there doesnt seem to be much stuff about it on the web. What I need to do is create a simple console application which will be able to find out what the values of a currently playing tack. I've downloaded the Windows Media player SDK which come with some IDL and
5
4567
by: Paul Fi | last post by:
I have this code which tries to obtain the number of items in the current playlist of windows media player: private void MainForm_Load(object sender, System.EventArgs e) { // get Window handle wnd = Win32.FindWindow("WMPlayerApp","Windows Media Player"); wnd = Win32.FindWindowEx(wnd, 0, "WMPAppHost", null); wnd = Win32.FindWindowEx(wnd, 0, "WMP Skin Host", null); wnd = Win32.FindWindowEx(wnd, 0, "CWmpControlCntr", null);
2
2860
by: codepuller | last post by:
I have a embedded media player into an ASP.NET web page and it all works except for the first time the page loads, when the user clicks on the play button, the player acts like it is going to play and then it stops. When I refresh the page, it works fine. Not sure what to think here about this. Any ideas?
2
4927
by: benmourra | last post by:
Hi all, I'm trying to create a web page using VS2005, ASP.NET 2.0, that will allow me to choose from a list of media files on my computer and then play my selection within an embedded Windows Media Player on the page. I've been able to eventually find out how to embed the player into the page by manually inserting code into the source view of my aspx file. It plays the file specified in the source view, but I'd like to be able to...
19
19249
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make things a bit easier. What I need to do is create a playlist and play it using JavaScript. I keep on getting close but not close enough to play the dang files. Has anyone done this before and can shed some light on what worked for them?
2
3273
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to quicktime or windows meida player depending on which plugin was found. after the plug in is found a iframe with the right player is created. here is the code. for some reason In IE the plug in doesnt work and in fire fox it crashes <!DOCTYPE html...
4
4441
by: subeen | last post by:
Hi, I am trying to parse a rss similar to the one found here (in example) http://www.feedforall.com/mediarss.htm <!-- Snipped for Brevity --> <item> <title>FeedForAll's Show Tunes and Song</title> <link>http://www.feedforall.com/songs.htm</link> <description>FeedForAll cool show tunes and lyrics. </description>
3
5677
by: hurricane_number_one | last post by:
I want to be able to play/pause/next/back the tracks in whatever media player app is running. So if iTunes is running, it will receive those commands, if Windows Media Player is, it will receive those commands, and so on, just like my multimedia keyboard does. I can't find any way to do this. I have tried sending: System.Windows.Forms.Keys.MediaPlayPause, System.Windows.Forms.Keys.MediaPreviousTrack, ect. but it didn't do anything. Is...
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.