11 Temmuz 2011 Pazartesi

C# Ses Dosyası Çalmak

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Media; // Eklenmesi gereken namespace.
 namespace WindowsApplication1
 {
public partial class Form1 : Form
 {
public Form1()
 {
 InitializeComponent();
 }
 private void Form1_Load(object sender, EventArgs e)
 {
 SoundPlayer player = new SoundPlayer();
string path = "C:\\windows\\media\\ding.wav"; // Müzik adresi
 player.SoundLocation = path;
 player.Play(); //play it
 }
 }
 }

0 yorum:

Yorum Gönder