Advertisement
Fhernd

Principal.cs

Mar 15th, 2018
1,236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Windows.Forms;
  3.  
  4. namespace R811ReproducirMP3
  5. {
  6.     public partial class Principal : Form
  7.     {
  8.         public Principal()
  9.         {
  10.             InitializeComponent();
  11.         }
  12.  
  13.         private void btnReproducirMp3_Click(object sender, EventArgs e)
  14.         {
  15.             OpenFileDialog ofd = new OpenFileDialog();
  16.             ofd.Filter = "Media Files|*.wav;*.mp3;*.mp3;*.wma|All Files|*.*";
  17.  
  18.             if (DialogResult.OK == ofd.ShowDialog())
  19.             {
  20.                 QuartzTypeLib.FilgraphManager graphManager = new QuartzTypeLib.FilgraphManager();
  21.                 QuartzTypeLib.IMediaControl mc = (QuartzTypeLib.IMediaControl) graphManager;
  22.  
  23.                 mc.RenderFile(ofd.FileName);
  24.  
  25.                 mc.Run();
  26.             }
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement