Pages

c#: Play wav files



// Play wav files

 System.Media.SoundPlayer player = new SoundPlayer();
 player.SoundLocation = "c:\\test.wav";
 player.LoadAsync();
 player.PlayLooping();   //asynchronous (loop)playing in new thread
 Thread.Sleep(5000);
 player.Stop();




java script Email

IsEmail: Returns a Boolean if the specified Expression is a
          valid e-mail address. If Expression is null, false
          is returned.

 Parameters:
      Expression = e-mail to validate.



function IsEmail(Expression)
{
        if (Expression == null)
                return (false);

        var supported = 0;
        if (window.RegExp)
        {
                var tempStr = "a";
                var tempReg = new RegExp(tempStr);
                if (tempReg.test(tempStr)) supported = 1;
        }
        if (!supported)
                return (Expression.indexOf(".") > 2) && (Expression.indexOf("@") > 0);
        var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
        var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
        return (!r1.test(Expression) && r2.test(Expression));
}

 

c sharp Set image opacity

here you can set and change image opacity and more

public static Image SetOpacity(Image original, float opacity)
{
Bitmap temp = new Bitmap(original.Width, original.Height);
Graphics g = Graphics.FromImage(temp);
ColorMatrix cm = new ColorMatrix();
cm.Matrix33 = opacity;
ImageAttributes ia = new ImageAttributes();
ia.SetColorMatrix(cm, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
g.DrawImage(original, new Rectangle(0, 0, temp.Width, temp.Height), 0, 0, original.Width, original.Height, GraphicsUnit.Pixel, ia);
g.Dispose();
return temp;
}

with my best----> mohamed basha
c sharp Set image opacity, c #, code 2 all, java script, c sharp

How to call other applications using the

Windows Forms Controls: How to call other applications using the
Process control
this video description How to call other applications using the Process control

Named and Optional Parameters in C# 4.0

microsoft video
learning c charp
this video to description Named and Optional Parameters in C# 4.0
you can download this video click here

Link With in

Related Posts Plugin for WordPress, Blogger...