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 piano
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Console.Beep(490, 120);
}
private void button2_Click(object sender, EventArgs e)
{
Console.Beep(590, 120);
}
private void button3_Click(object sender, EventArgs e)
{
Console.Beep(690, 120);
}
private void button4_Click(object sender, EventArgs e)
{
Console.Beep(790, 120);
}
private void button5_Click(object sender, EventArgs e)
{
Console.Beep(890, 120);
}
private void button6_Click(object sender, EventArgs e)
{
Console.Beep(990, 120);
}
private void button7_Click(object sender, EventArgs e)
{
Console.Beep(1090, 120);
}
private void button8_Click(object sender, EventArgs e)
{
Console.Beep(1190, 120);
}
private void button9_Click(object sender, EventArgs e)
{
Console.Beep(1290, 120);
}
private void button13_Click(object sender, EventArgs e)
{
Console.Beep(390, 120);
}
private void button14_Click(object sender, EventArgs e)
{
Console.Beep(290, 120);
}
private void button10_Click(object sender, EventArgs e)
{
Console.Beep(1390, 120);
}
private void button11_Click(object sender, EventArgs e)
{
Console.Beep(1490, 120);
}
private void button12_Click(object sender, EventArgs e)
{
Console.Beep(1590, 120);
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://csharp-uygulamalari.blogspot.com.tr/");
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.A)
{
button14.BackColor = Color.Aqua;
Console.Beep(290, 120);
}
if (e.KeyCode == Keys.S)
{
button13.BackColor = Color.Aqua;
Console.Beep(390, 120);
}
if (e.KeyCode == Keys.D)
{
button1.BackColor = Color.Aqua;
Console.Beep(490, 120);
}
if (e.KeyCode == Keys.F)
{
button2.BackColor = Color.Aqua;
Console.Beep(590, 120);
}
if (e.KeyCode == Keys.G)
{
button3.BackColor = Color.Aqua;
Console.Beep(690, 120);
}
if (e.KeyCode == Keys.H)
{
button4.BackColor = Color.Aqua;
Console.Beep(790, 120);
}
if (e.KeyCode == Keys.J)
{
button5.BackColor = Color.Aqua;
Console.Beep(890, 120);
}
if (e.KeyCode == Keys.K)
{
button6.BackColor = Color.Aqua;
Console.Beep(990, 120);
}
if (e.KeyCode == Keys.L)
{
button7.BackColor = Color.Aqua;
Console.Beep(1090, 120);
}
if (e.KeyCode == Keys.Z)
{
button8.BackColor = Color.Aqua;
Console.Beep(1190, 120);
}
if (e.KeyCode == Keys.X)
{
button9.BackColor = Color.Aqua;
Console.Beep(1290, 120);
}
if (e.KeyCode == Keys.C)
{
button10.BackColor = Color.Aqua;
Console.Beep(1390, 120);
}
if (e.KeyCode == Keys.V)
{
button11.BackColor = Color.Aqua;
Console.Beep(1490, 120);
}
if (e.KeyCode == Keys.B)
{
button12.BackColor = Color.Aqua;
Console.Beep(1590, 120);
}
}
private void Form1_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.A)
{
button14.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.S)
{
button13.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.D)
{
button1.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.F)
{
button2.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.G)
{
button3.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.H)
{
button4.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.J)
{
button5.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.K)
{
button6.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.L)
{
button7.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.Z)
{
button8.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.X)
{
button9.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.C)
{
button10.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.V)
{
button11.BackColor = Color.Azure;
}
if (e.KeyCode == Keys.B)
{
button12.BackColor = Color.Azure;
}
}
}
}