Solved

AxWindowsMediaPlayer & File String

Posted on 2007-11-16
2
1,843 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
2 Comments
 
LVL 18

Accepted Solution

by:
armoghan earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now