Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/12/2010, 08:21
Avatar de atak
atak
 
Fecha de Ingreso: julio-2005
Ubicación: Huancayo
Mensajes: 490
Antigüedad: 18 años, 9 meses
Puntos: 5
Generar sonido en C#

Hola,

Una aplicación al evento Button sería :

Código PHP:

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;

namespace w002
{
    public 
partial class Form1 Form
    
{
        private 
System.Media.SoundPlayer miSonido
        public 
Form1()
        {
            
InitializeComponent();
            
miSonido = new System.Media.SoundPlayer();
        }

        private 
void btnPlay01_Click(object senderEventArgs e)
        {
            
miSonido.SoundLocation = @"C:\ejemplo\w002\w002\sound\online.wav";
            
miSonido.Play();
        }

        private 
void btnPlay02_Click(object senderEventArgs e)
        {
            
miSonido.SoundLocation = @"C:\ejemplo\w002\w002\sound\type.wav";
            
miSonido.PlayLooping();
        }

    }

lo puedes aplicar para el evento que deseas en el TEXTBOX.


Saludos
__________________
. .: El mejor Inicio :. .