First of all add these namespaces :
using Microsoft.Win32; using System.Collections;
After that add this function.:
VB.NET, C#, Java, HTML, JQuery, Javascript, PHP, Software Reviews, Computer Tips and Tech News
using Microsoft.Win32; using System.Collections;
Imports System.Text Imports System.Security.Cryptography Public Class 3_DES Public Shared Function Encrypt(ByVal toEncrypt As String, ByVal key As String, ByVal useHashing As Boolean) As String Dim keyArray As Byte() Dim toEncryptArray As Byte() = UTF8Encoding.UTF8.GetBytes(toEncrypt) If useHashing Then Dim hashmd5 As New MD5CryptoServiceProvider() keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key)) Else keyArray = UTF8Encoding.UTF8.GetBytes(key) End If Dim tdes As New TripleDESCryptoServiceProvider() tdes.Key = keyArray tdes.Mode = CipherMode.ECB tdes.Padding = PaddingMode.PKCS7 Dim cTransform As ICryptoTransform = tdes.CreateEncryptor() Dim resultArray As Byte() = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length) Return Convert.ToBase64String(resultArray, 0, resultArray.Length) End Function End Class
Using System.Media;
SoundPlayer wave = new SoundPlayer(); string path = "path to .WAV"; wave.SoundLocation = path; wave.Play();
public partial class Form1 : Form {
protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ClassStyle |= CS_DROPSHADOW; return cp; } }