using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Ya_fm
{
public partial class Frm_ply_sng : Form
{
string fullpath;
public Frm_ply_sng()
{
InitializeComponent();
}
private void Frm_conductor_help_Load(object sender, EventArgs e)
{
WindowsMediaPlayer1.Visible = true;
WindowsMediaPlayer1.settings.autoStart = false;
}
private void button1_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog opn_song = new OpenFileDialog();
opn_song.Filter = " Music Files(*.mp3,*.wav,*.avi,*.mpeg,*.wmv)|*.mp3;*.wav,*;avi;*.mpeg;*.wmv;";
if (opn_song.ShowDialog() == DialogResult.OK)
{
fullpath = System.IO.Path.GetFullPath(opn_song.FileName);
}
WindowsMediaPlayer1.Visible = true;
WindowsMediaPlayer1.settings.autoStart = true;
WindowsMediaPlayer1.URL = fullpath;
}
catch (Exception)
{
throw new ApplicationException("Failed loading Song");
}
}
}
this is my code please help me.......

New Topic/Question
Reply




MultiQuote




|