Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

AxWindowsMediaPlayer & File String

Posted on 2007-11-16
2
Medium Priority
?
1,871 Views
Last Modified: 2010-04-21
Hi Guys,

I have a form which has about 35 buttons on it. Each button plays a music file. At present the string I use to determine which file to play is like this....

        Dim playlist As WMPLib.IWMPPlaylist
        playlist = Me.AxWindowsMediaPlayer1.newPlaylist("Playlist B1", "")
        Dim item As WMPLib.IWMPMedia = AxWindowsMediaPlayer1.newMedia(Form2.TextBox1.Text)
        playlist.appendItem(item)
        AxWindowsMediaPlayer1.currentPlaylist = playlist

As you can see it finds the file location from the text box on form2. Is there a way of getting it to read directly from the database rather than from the text box on form2?

The database itself has 1 table called Locations and it has 35 fields (1 for each button) labeled Cue 1, Cue 2, etc. etc.

Lee
0
Comment
Question by:lfaulkneruk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
armoghan earned 1500 total points
ID: 20312001
if you have fetched the datarow  from database
then it would be something like
 Dim playlist As WMPLib.IWMPPlaylist
        playlist = Me.AxWindowsMediaPlayer1.newPlaylist("Playlist B1", "")
Dim item As WMPLib.IWMPMedia
for each col as DataColumn in ds.Tables(0).Columns
item=  AxWindowsMediaPlayer1.newMedia(ds.Tables(0).Rows(0).Item(col.ColName))
 playlist.appendItem(item)
  AxWindowsMediaPlayer1.currentPlaylist = playlist
end for
0
 

Author Closing Comment

by:lfaulkneruk
ID: 31409575
Thanks very much armoghan.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question