TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
G?a???? ?a?
NA
1
935
the wav c# player stops playing the song after 4/5 seconds
Jul 29 2014 3:34 AM
i have made a simple wav player in c# and here is my code
*******************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Media;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void next_Click(object sender, EventArgs e)
{
}
private void nnext_Click(object sender, EventArgs e)
{
}
private void playpause_Click(object sender, EventArgs e)
{
try
{
string sptbvs = sptb.Text;
SoundPlayer my_wave_file = new SoundPlayer(sptbvs);
my_wave_file.PlaySync();
}
catch (InvalidCastException)
{
MessageBox.Show("Error 502 :invalid Path.");
}
}
private void sptb_TextChanged(object sender, EventArgs e)
{
string sptbvs = sptb.Text;
}
private void before_Click(object sender, EventArgs e)
{
}
private void bbefore_Click(object sender, EventArgs e)
{
}
}
}
*********************************************
but when i click the play/pause button the song starts properly and after some seconds (usualy 4) it stops playing the song
why is this happening
please help
Reply
Answers (
1
)
How to save image to database using N-tier architecture
how to make my software logout if user is not active