Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Rıza Berkay Ayçelebi22-Nov-16 9:46
Rıza Berkay Ayçelebi22-Nov-16 9:46 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Richard MacCutchan22-Nov-16 10:52
mveRichard MacCutchan22-Nov-16 10:52 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Pete O'Hanlon22-Nov-16 0:35
mvePete O'Hanlon22-Nov-16 0:35 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
OriginalGriff22-Nov-16 1:06
mveOriginalGriff22-Nov-16 1:06 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Eddy Vluggen22-Nov-16 0:17
professionalEddy Vluggen22-Nov-16 0:17 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
OriginalGriff22-Nov-16 0:24
mveOriginalGriff22-Nov-16 0:24 
AnswerRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Patrice T22-Nov-16 11:27
mvePatrice T22-Nov-16 11:27 
QuestionWindows Media Player - Play MP3. Pin
ngogiatuong20-Nov-16 20:19
ngogiatuong20-Nov-16 20:19 
Dear all
I create a method to play mp3 base on Text input. I create a playlist and import it to player. but the problem is that, the player plays only 3 files. (and i debugged and found that attributeCount always=3).
Please help for this case.
Below is my code:
C#
private void PlayMP3()
        {
            try
            {
                string strLP = this.textBox1.Text.Trim();
                string strPath = Application.StartupPath;
                WMPLib.WindowsMediaPlayer player = new WMPLib.WindowsMediaPlayer();
                WMPLib.IWMPPlaylist myplaylist = player.playlistCollection.newPlaylist("myplaylist");
                //Clear playlist before create new one.
                myplaylist.clear();
               //Create new playlist
                foreach (char c in strLP)
                {
                    //read
                    string strFileName = "raw\\" + string.Concat(c, ".mp3");
                    string strFileLocation = Path.Combine(strPath, strFileName);
                    WMPLib.IWMPMedia media = player.newMedia(strFileLocation);
                    myplaylist.appendItem(media);
                }
                player.playlistCollection.importPlaylist(myplaylist);
                player.currentPlaylist = myplaylist;
                //Play
                player.controls.play();
               
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

AnswerRe: Windows Media Player - Play MP3. Pin
Afzaal Ahmad Zeeshan20-Nov-16 21:11
professionalAfzaal Ahmad Zeeshan20-Nov-16 21:11 
GeneralRe: Windows Media Player - Play MP3. Pin
ngogiatuong20-Nov-16 22:14
ngogiatuong20-Nov-16 22:14 
GeneralRe: Windows Media Player - Play MP3. Pin
Afzaal Ahmad Zeeshan21-Nov-16 1:23
professionalAfzaal Ahmad Zeeshan21-Nov-16 1:23 
AnswerRe: Windows Media Player - Play MP3. Pin
RichardGrimmer21-Nov-16 4:42
RichardGrimmer21-Nov-16 4:42 
QuestionNetwork File Path Problem Pin
Kevin Marois18-Nov-16 10:30
professionalKevin Marois18-Nov-16 10:30 
AnswerRe: Network File Path Problem Pin
OriginalGriff18-Nov-16 21:44
mveOriginalGriff18-Nov-16 21:44 
AnswerRe: Network File Path Problem Pin
Bernhard Hiller20-Nov-16 21:10
Bernhard Hiller20-Nov-16 21:10 
AnswerRe: Network File Path Problem Pin
Richard Deeming21-Nov-16 2:58
mveRichard Deeming21-Nov-16 2:58 
GeneralRe: Network File Path Problem Pin
Kevin Marois21-Nov-16 4:43
professionalKevin Marois21-Nov-16 4:43 
QuestionHow To Refactor This Pin
Kevin Marois18-Nov-16 4:48
professionalKevin Marois18-Nov-16 4:48 
AnswerRe: How To Refactor This Pin
Pete O'Hanlon18-Nov-16 5:41
mvePete O'Hanlon18-Nov-16 5:41 
GeneralRe: How To Refactor This Pin
Kevin Marois18-Nov-16 6:03
professionalKevin Marois18-Nov-16 6:03 
GeneralRe: How To Refactor This Pin
Gerry Schmitz18-Nov-16 7:49
mveGerry Schmitz18-Nov-16 7:49 
GeneralRe: How To Refactor This Pin
Kevin Marois18-Nov-16 9:03
professionalKevin Marois18-Nov-16 9:03 
GeneralRe: How To Refactor This Pin
Gerry Schmitz18-Nov-16 10:44
mveGerry Schmitz18-Nov-16 10:44 
QuestionSaving Datagridview Pin
Member 1285691017-Nov-16 12:23
Member 1285691017-Nov-16 12:23 
AnswerRe: Saving Datagridview Pin
Dave Kreskowiak17-Nov-16 13:00
mveDave Kreskowiak17-Nov-16 13:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.