EkrandaSanal Klavye. [C]

ALpMontana

КЯaL´da TaNıMaM КuяaL´da
Katılım
28 May 2006
Mesajlar
6,644
Reaction score
0
Puanları
0
Yaş
38
Konum
Eski Açık [ALiSamiYEN]
Universitede ßir Ders çin YapıLmısdı :D
arşivden sizin için çıkarttım ;)
açık kod werdim ki istediğiniz yeri değiştirin,kopyacı gencLik :durdurun



//Copright by Alp Oguzhan MERTOL and Zeki GÖRÜR and Fulya KESICI
//Saat:14.44tarih 23/03/2006
//Güle güle kullanın misafirler,arkadaşlar.
using System;
using System.Windows.Forms;
using System.Drawing;
public class Form1
{
// reference to last Button pressed
private Button m_btnLastButton;

//NOTE: The following procedure is required by the Windows Form Designer
//It can be modified using the Windows Form Designer.
//Do not modify it using the code editor.
internal System.Windows.Forms.Label lblPrompt;
internal System.Windows.Forms.TextBox txtOutput;
internal System.Windows.Forms.Button btnF1;
internal System.Windows.Forms.Button btnF2;
internal System.Windows.Forms.Button btnF3;
internal System.Windows.Forms.Button btnF4;
internal System.Windows.Forms.Button btnF5;
internal System.Windows.Forms.Button btnF6;
internal System.Windows.Forms.Button btnF7;
internal System.Windows.Forms.Button btnF8;
internal System.Windows.Forms.Button btnF9;
internal System.Windows.Forms.Button btnF10;
internal System.Windows.Forms.Button btnF11;
internal System.Windows.Forms.Button btnF12;
internal System.Windows.Forms.Button btn0;
internal System.Windows.Forms.Button btn1;
internal System.Windows.Forms.Button btn2;
internal System.Windows.Forms.Button btn3;
internal System.Windows.Forms.Button btn4;
internal System.Windows.Forms.Button btn5;
internal System.Windows.Forms.Button btn6;
internal System.Windows.Forms.Button btn7;
internal System.Windows.Forms.Button btn8;
internal System.Windows.Forms.Button btn9;
internal System.Windows.Forms.Button btnHyphen;
internal System.Windows.Forms.Button btnPlus;
internal System.Windows.Forms.Button btnTilde;
internal System.Windows.Forms.Button btnTab;
internal System.Windows.Forms.Button btnCaps;
internal System.Windows.Forms.Button btnShiftLeft;
internal System.Windows.Forms.Button btnCtrlLeft;
internal System.Windows.Forms.Button btnFn;
internal System.Windows.Forms.Button btnAltLeft;
internal System.Windows.Forms.Button btnSpace;
internal System.Windows.Forms.Button btnBackspace;
internal System.Windows.Forms.Button btnSlash;
internal System.Windows.Forms.Button btnEnter;
internal System.Windows.Forms.Button btnUp;
internal System.Windows.Forms.Button btnLeft;
internal System.Windows.Forms.Button btnDown;
internal System.Windows.Forms.Button btnRight;
internal System.Windows.Forms.Button btnLeftBrace;
internal System.Windows.Forms.Button btnRightBrace;
internal System.Windows.Forms.Button btnColon;
internal System.Windows.Forms.Button btnQuote;
internal System.Windows.Forms.Button btnComma;
internal System.Windows.Forms.Button btnPeriod;
internal System.Windows.Forms.Button btnQuestion;
internal System.Windows.Forms.Button btnA;
internal System.Windows.Forms.Button btnB;
internal System.Windows.Forms.Button btnC;
internal System.Windows.Forms.Button btnD;
internal System.Windows.Forms.Button btnE;
internal System.Windows.Forms.Button btnF;
internal System.Windows.Forms.Button btnG;
internal System.Windows.Forms.Button btnH;
internal System.Windows.Forms.Button btnI;
internal System.Windows.Forms.Button btnJ;
internal System.Windows.Forms.Button btnK;
internal System.Windows.Forms.Button btnL;
internal System.Windows.Forms.Button btnN;
internal System.Windows.Forms.Button btnO;
internal System.Windows.Forms.Button btnP;
internal System.Windows.Forms.Button btnQ;
internal System.Windows.Forms.Button btnR;
internal System.Windows.Forms.Button btnS;
internal System.Windows.Forms.Button btnT;
internal System.Windows.Forms.Button btnU;
internal System.Windows.Forms.Button btnV;
internal System.Windows.Forms.Button btnW;
internal System.Windows.Forms.Button btnM;
internal System.Windows.Forms.Button btnX;
internal System.Windows.Forms.Button btnY;
internal System.Windows.Forms.Button btnZ;

private void FrmTypingApplication_Load(object sender, System.EventArgs e)
{
this.lblPrompt = new System.Windows.Forms.Label();
this.txtOutput = new System.Windows.Forms.TextBox();
this.btnF1 = new System.Windows.Forms.Button();
this.btnF2 = new System.Windows.Forms.Button();
this.btnF3 = new System.Windows.Forms.Button();
this.btnF4 = new System.Windows.Forms.Button();
this.btnF5 = new System.Windows.Forms.Button();
this.btnF6 = new System.Windows.Forms.Button();
this.btnF7 = new System.Windows.Forms.Button();
this.btnF8 = new System.Windows.Forms.Button();
this.btnF9 = new System.Windows.Forms.Button();
this.btnF10 = new System.Windows.Forms.Button();
this.btnF11 = new System.Windows.Forms.Button();
this.btnF12 = new System.Windows.Forms.Button();
this.btn1 = new System.Windows.Forms.Button();
this.btn2 = new System.Windows.Forms.Button();
this.btn3 = new System.Windows.Forms.Button();
this.btn4 = new System.Windows.Forms.Button();
this.btn5 = new System.Windows.Forms.Button();
this.btn6 = new System.Windows.Forms.Button();
this.btn7 = new System.Windows.Forms.Button();
this.btn8 = new System.Windows.Forms.Button();
this.btn9 = new System.Windows.Forms.Button();
this.btn0 = new System.Windows.Forms.Button();
this.btnHyphen = new System.Windows.Forms.Button();
this.btnPlus = new System.Windows.Forms.Button();
this.btnTilde = new System.Windows.Forms.Button();
this.btnTab = new System.Windows.Forms.Button();
this.btnCtrlLeft = new System.Windows.Forms.Button();
this.btnFn = new System.Windows.Forms.Button();
this.btnAltLeft = new System.Windows.Forms.Button();
this.btnEnter = new System.Windows.Forms.Button();
this.btnSlash = new System.Windows.Forms.Button();
this.btnBackspace = new System.Windows.Forms.Button();
this.btnSpace = new System.Windows.Forms.Button();
this.btnCaps = new System.Windows.Forms.Button();
this.btnShiftLeft = new System.Windows.Forms.Button();
this.btnUp = new System.Windows.Forms.Button();
this.btnLeft = new System.Windows.Forms.Button();
this.btnDown = new System.Windows.Forms.Button();
this.btnRight = new System.Windows.Forms.Button();
this.btnLeftBrace = new System.Windows.Forms.Button();
this.btnRightBrace = new System.Windows.Forms.Button();
this.btnColon = new System.Windows.Forms.Button();
this.btnQuote = new System.Windows.Forms.Button();
this.btnComma = new System.Windows.Forms.Button();
this.btnPeriod = new System.Windows.Forms.Button();
this.btnQuestion = new System.Windows.Forms.Button();
this.btnC = new System.Windows.Forms.Button();
this.btnB = new System.Windows.Forms.Button();
this.btnA = new System.Windows.Forms.Button();
this.btnG = new System.Windows.Forms.Button();
this.btnF = new System.Windows.Forms.Button();
this.btnE = new System.Windows.Forms.Button();
this.btnD = new System.Windows.Forms.Button();
this.btnK = new System.Windows.Forms.Button();
this.btnJ = new System.Windows.Forms.Button();
this.btnI = new System.Windows.Forms.Button();
this.btnH = new System.Windows.Forms.Button();
this.btnO = new System.Windows.Forms.Button();
this.btnN = new System.Windows.Forms.Button();
this.btnM = new System.Windows.Forms.Button();
this.btnL = new System.Windows.Forms.Button();
this.btnT = new System.Windows.Forms.Button();
this.btnS = new System.Windows.Forms.Button();
this.btnR = new System.Windows.Forms.Button();
this.btnQ = new System.Windows.Forms.Button();
this.btnP = new System.Windows.Forms.Button();
this.btnY = new System.Windows.Forms.Button();
this.btnX = new System.Windows.Forms.Button();
this.btnW = new System.Windows.Forms.Button();
this.btnV = new System.Windows.Forms.Button();
this.btnU = new System.Windows.Forms.Button();
this.btnZ = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//lblPrompt
//
this.lblPrompt.Location = new System.Drawing.Point(32, 8);
this.lblPrompt.Name = "lblPrompt";
this.lblPrompt.Size = new System.Drawing.Size(408, 40);
this.lblPrompt.TabIndex = 64;
this.lblPrompt.Text = "Type some text using your keyboard.";
//
//txtOutput
//
this.txtOutput.AcceptsTab = true;
this.txtOutput.BackColor = System.Drawing.Color.White;
this.txtOutput.Font = new System.Drawing.Font("Tahoma", 10.2f);
this.txtOutput.Location = new System.Drawing.Point(32, 64);
this.txtOutput.Multiline = true;
this.txtOutput.Name = "txtOutput";
this.txtOutput.ReadOnly = true;
this.txtOutput.Size = new System.Drawing.Size(408, 136);
this.txtOutput.TabIndex = 0;
this.txtOutput.Text = "";
//
//btnF1
//
this.btnF1.Location = new System.Drawing.Point(48, 216);
this.btnF1.Name = "btnF1";
this.btnF1.Size = new System.Drawing.Size(32, 23);
this.btnF1.TabIndex = 74;
this.btnF1.Text = "F1";
//
//btnF2
//
this.btnF2.Location = new System.Drawing.Point(80, 216);
this.btnF2.Name = "btnF2";
this.btnF2.Size = new System.Drawing.Size(32, 23);
this.btnF2.TabIndex = 72;
this.btnF2.Text = "F2";
//
//btnF3
//
this.btnF3.Location = new System.Drawing.Point(112, 216);
this.btnF3.Name = "btnF3";
this.btnF3.Size = new System.Drawing.Size(32, 23);
this.btnF3.TabIndex = 67;
this.btnF3.Text = "F3";
//
//btnF4
//
this.btnF4.Location = new System.Drawing.Point(144, 216);
this.btnF4.Name = "btnF4";
this.btnF4.Size = new System.Drawing.Size(32, 23);
this.btnF4.TabIndex = 68;
this.btnF4.Text = "F4";
//
//btnF5
//
this.btnF5.Location = new System.Drawing.Point(176, 216);
this.btnF5.Name = "btnF5";
this.btnF5.Size = new System.Drawing.Size(32, 23);
this.btnF5.TabIndex = 69;
this.btnF5.Text = "F5";
//
//btnF6
//
this.btnF6.Location = new System.Drawing.Point(208, 216);
this.btnF6.Name = "btnF6";
this.btnF6.Size = new System.Drawing.Size(32, 23);
this.btnF6.TabIndex = 70;
this.btnF6.Text = "F6";
//
//btnF7
//
this.btnF7.Location = new System.Drawing.Point(240, 216);
this.btnF7.Name = "btnF7";
this.btnF7.Size = new System.Drawing.Size(32, 23);
this.btnF7.TabIndex = 71;
this.btnF7.Text = "F7";
//
//btnF8
//
this.btnF8.Location = new System.Drawing.Point(272, 216);
this.btnF8.Name = "btnF8";
this.btnF8.Size = new System.Drawing.Size(32, 23);
this.btnF8.TabIndex = 72;
this.btnF8.Text = "F8";
//
//btnF9
//
this.btnF9.Location = new System.Drawing.Point(304, 216);
this.btnF9.Name = "btnF9";
this.btnF9.Size = new System.Drawing.Size(32, 23);
this.btnF9.TabIndex = 73;
this.btnF9.Text = "F9";
//
//btnF10
//
this.btnF10.Location = new System.Drawing.Point(336, 216);
this.btnF10.Name = "btnF10";
this.btnF10.Size = new System.Drawing.Size(32, 23);
this.btnF10.TabIndex = 74;
this.btnF10.Text = "F10";
//
//btnF11
//
this.btnF11.Location = new System.Drawing.Point(368, 216);
this.btnF11.Name = "btnF11";
this.btnF11.Size = new System.Drawing.Size(32, 23);
this.btnF11.TabIndex = 75;
this.btnF11.Text = "F11";
//
//btnF12
//
this.btnF12.Location = new System.Drawing.Point(400, 216);
this.btnF12.Name = "btnF12";
this.btnF12.Size = new System.Drawing.Size(32, 23);
this.btnF12.TabIndex = 76;
this.btnF12.Text = "F12";
//
//btn1
//
this.btn1.Location = new System.Drawing.Point(80, 240);
this.btn1.Name = "btn1";
this.btn1.Size = new System.Drawing.Size(24, 23);
this.btn1.TabIndex = 77;
this.btn1.Text = "1";
//
//btn2
//
this.btn2.Location = new System.Drawing.Point(104, 240);
this.btn2.Name = "btn2";
this.btn2.Size = new System.Drawing.Size(24, 23);
this.btn2.TabIndex = 78;
this.btn2.Text = "2";
//
//btn3
//
this.btn3.Location = new System.Drawing.Point(128, 240);
this.btn3.Name = "btn3";
this.btn3.Size = new System.Drawing.Size(24, 23);
this.btn3.TabIndex = 79;
this.btn3.Text = "3";
//
//btn4
//
this.btn4.Location = new System.Drawing.Point(152, 240);
this.btn4.Name = "btn4";
this.btn4.Size = new System.Drawing.Size(24, 23);
this.btn4.TabIndex = 80;
this.btn4.Text = "4";
//
//btn5
//
this.btn5.Location = new System.Drawing.Point(176, 240);
this.btn5.Name = "btn5";
this.btn5.Size = new System.Drawing.Size(24, 23);
this.btn5.TabIndex = 81;
this.btn5.Text = "5";
//
//btn6
//
this.btn6.Location = new System.Drawing.Point(200, 240);
this.btn6.Name = "btn6";
this.btn6.Size = new System.Drawing.Size(24, 23);
this.btn6.TabIndex = 82;
this.btn6.Text = "6";
//
//btn7
//
this.btn7.Location = new System.Drawing.Point(224, 240);
this.btn7.Name = "btn7";
this.btn7.Size = new System.Drawing.Size(24, 23);
this.btn7.TabIndex = 83;
this.btn7.Text = "7";
//
//btn8
//
this.btn8.Location = new System.Drawing.Point(248, 240);
this.btn8.Name = "btn8";
this.btn8.Size = new System.Drawing.Size(24, 23);
this.btn8.TabIndex = 84;
this.btn8.Text = "8";
//
//btn9
//
this.btn9.Location = new System.Drawing.Point(272, 240);
this.btn9.Name = "btn9";
this.btn9.Size = new System.Drawing.Size(24, 23);
this.btn9.TabIndex = 85;
this.btn9.Text = "9";
//
//btn0
//
this.btn0.Location = new System.Drawing.Point(296, 240);
this.btn0.Name = "btn0";
this.btn0.Size = new System.Drawing.Size(24, 23);
this.btn0.TabIndex = 86;
this.btn0.Text = "0";
//
//btnHyphen
//
this.btnHyphen.Location = new System.Drawing.Point(320, 240);
this.btnHyphen.Name = "btnHyphen";
this.btnHyphen.Size = new System.Drawing.Size(24, 23);
this.btnHyphen.TabIndex = 87;
this.btnHyphen.Text = "-";
//
//btnPlus
//
this.btnPlus.Location = new System.Drawing.Point(344, 240);
this.btnPlus.Name = "btnPlus";
this.btnPlus.Size = new System.Drawing.Size(24, 23);
this.btnPlus.TabIndex = 88;
this.btnPlus.Text = "+";
//
//btnTilde
//
this.btnTilde.Location = new System.Drawing.Point(32, 240);
this.btnTilde.Name = "btnTilde";
this.btnTilde.Size = new System.Drawing.Size(48, 23);
this.btnTilde.TabIndex = 89;
this.btnTilde.Text = "~";
//
//btnTab
//
this.btnTab.Location = new System.Drawing.Point(32, 264);
this.btnTab.Name = "btnTab";
this.btnTab.Size = new System.Drawing.Size(64, 23);
this.btnTab.TabIndex = 90;
this.btnTab.Text = "Tab";
//
//btnCtrlLeft
//
this.btnCtrlLeft.Location = new System.Drawing.Point(32, 336);
this.btnCtrlLeft.Name = "btnCtrlLeft";
this.btnCtrlLeft.Size = new System.Drawing.Size(56, 23);
this.btnCtrlLeft.TabIndex = 91;
this.btnCtrlLeft.Text = "Ctrl";
//
//btnFn
//
this.btnFn.Enabled = false;
this.btnFn.Location = new System.Drawing.Point(88, 336);
this.btnFn.Name = "btnFn";
this.btnFn.Size = new System.Drawing.Size(32, 23);
this.btnFn.TabIndex = 92;
this.btnFn.Text = "Fn";
//
//btnAltLeft
//
this.btnAltLeft.Location = new System.Drawing.Point(120, 336);
this.btnAltLeft.Name = "btnAltLeft";
this.btnAltLeft.Size = new System.Drawing.Size(32, 23);
this.btnAltLeft.TabIndex = 93;
this.btnAltLeft.Text = "Alt";
//
//btnEnter
//
this.btnEnter.Location = new System.Drawing.Point(368, 288);
this.btnEnter.Name = "btnEnter";
this.btnEnter.Size = new System.Drawing.Size(72, 23);
this.btnEnter.TabIndex = 94;
this.btnEnter.Text = "Enter";
//
//btnSlash
//
this.btnSlash.Location = new System.Drawing.Point(384, 264);
this.btnSlash.Name = "btnSlash";
this.btnSlash.Size = new System.Drawing.Size(56, 23);
this.btnSlash.TabIndex = 95;
this.btnSlash.Text = "\\";
//
//btnBackspace
//
this.btnBackspace.Location = new System.Drawing.Point(368, 240);
this.btnBackspace.Name = "btnBackspace";
this.btnBackspace.Size = new System.Drawing.Size(72, 23);
this.btnBackspace.TabIndex = 96;
this.btnBackspace.Text = "Backspace";
//
//btnSpace
//
this.btnSpace.Location = new System.Drawing.Point(152, 336);
this.btnSpace.Name = "btnSpace";
this.btnSpace.Size = new System.Drawing.Size(144, 23);
this.btnSpace.TabIndex = 97;
//
//btnCaps
//
this.btnCaps.Location = new System.Drawing.Point(32, 288);
this.btnCaps.Name = "btnCaps";
this.btnCaps.Size = new System.Drawing.Size(72, 23);
this.btnCaps.TabIndex = 98;
this.btnCaps.Text = "Caps Lock";
//
//btnShiftLeft
//
this.btnShiftLeft.Location = new System.Drawing.Point(32, 312);
this.btnShiftLeft.Name = "btnShiftLeft";
this.btnShiftLeft.Size = new System.Drawing.Size(88, 23);
this.btnShiftLeft.TabIndex = 99;
this.btnShiftLeft.Text = "Shift";
//
//btnUp
//
this.btnUp.Location = new System.Drawing.Point(384, 312);
this.btnUp.Name = "btnUp";
this.btnUp.Size = new System.Drawing.Size(24, 23);
this.btnUp.TabIndex = 100;
this.btnUp.Text = "^";
//
//btnLeft
//
this.btnLeft.Location = new System.Drawing.Point(360, 336);
this.btnLeft.Name = "btnLeft";
this.btnLeft.Size = new System.Drawing.Size(24, 23);
this.btnLeft.TabIndex = 101;
this.btnLeft.Text = "<";
//
//btnDown
//
this.btnDown.Location = new System.Drawing.Point(384, 336);
this.btnDown.Name = "btnDown";
this.btnDown.Size = new System.Drawing.Size(24, 23);
this.btnDown.TabIndex = 102;
this.btnDown.Text = "v";
//
//btnRight
//
this.btnRight.Location = new System.Drawing.Point(408, 336);
this.btnRight.Name = "btnRight";
this.btnRight.Size = new System.Drawing.Size(24, 23);
this.btnRight.TabIndex = 103;
this.btnRight.Text = ">";
//
//btnLeftBrace
//
this.btnLeftBrace.Location = new System.Drawing.Point(336, 264);
this.btnLeftBrace.Name = "btnLeftBrace";
this.btnLeftBrace.Size = new System.Drawing.Size(24, 23);
this.btnLeftBrace.TabIndex = 104;
this.btnLeftBrace.Text = "[";
//
//btnRightBrace
//
this.btnRightBrace.Location = new System.Drawing.Point(360, 264);
this.btnRightBrace.Name = "btnRightBrace";
this.btnRightBrace.Size = new System.Drawing.Size(24, 23);
this.btnRightBrace.TabIndex = 105;
this.btnRightBrace.Text = "]";
//
//btnColon
//
this.btnColon.Location = new System.Drawing.Point(320, 288);
this.btnColon.Name = "btnColon";
this.btnColon.Size = new System.Drawing.Size(24, 23);
this.btnColon.TabIndex = 106;
this.btnColon.Text = ":";
//
//btnQuote
//
this.btnQuote.Location = new System.Drawing.Point(344, 288);
this.btnQuote.Name = "btnQuote";
this.btnQuote.Size = new System.Drawing.Size(24, 23);
this.btnQuote.TabIndex = 107;
this.btnQuote.Text = "\"";
//
//btnComma
//
this.btnComma.Location = new System.Drawing.Point(288, 312);
this.btnComma.Name = "btnComma";
this.btnComma.Size = new System.Drawing.Size(24, 23);
this.btnComma.TabIndex = 108;
this.btnComma.Text = ",";
//
//btnPeriod
//
this.btnPeriod.Location = new System.Drawing.Point(312, 312);
this.btnPeriod.Name = "btnPeriod";
this.btnPeriod.Size = new System.Drawing.Size(24, 23);
this.btnPeriod.TabIndex = 109;
this.btnPeriod.Text = ".";
//
//btnQuestion
//
this.btnQuestion.Location = new System.Drawing.Point(336, 312);
this.btnQuestion.Name = "btnQuestion";
this.btnQuestion.Size = new System.Drawing.Size(24, 23);
this.btnQuestion.TabIndex = 110;
this.btnQuestion.Text = "?";
//
//btnC
//
this.btnC.Location = new System.Drawing.Point(168, 312);
this.btnC.Name = "btnC";
this.btnC.Size = new System.Drawing.Size(24, 23);
this.btnC.TabIndex = 111;
this.btnC.Text = "C";
//
//btnB
//
this.btnB.Location = new System.Drawing.Point(216, 312);
this.btnB.Name = "btnB";
this.btnB.Size = new System.Drawing.Size(24, 23);
this.btnB.TabIndex = 112;
this.btnB.Text = "B";
//
//btnA
//
this.btnA.Location = new System.Drawing.Point(104, 288);
this.btnA.Name = "btnA";
this.btnA.Size = new System.Drawing.Size(24, 23);
this.btnA.TabIndex = 113;
this.btnA.Text = "A";
//
//btnG
//
this.btnG.Location = new System.Drawing.Point(200, 288);
this.btnG.Name = "btnG";
this.btnG.Size = new System.Drawing.Size(24, 23);
this.btnG.TabIndex = 114;
this.btnG.Text = "G";
//
//btnF
//
this.btnF.Location = new System.Drawing.Point(176, 288);
this.btnF.Name = "btnF";
this.btnF.Size = new System.Drawing.Size(24, 23);
this.btnF.TabIndex = 115;
this.btnF.Text = "F";
//
//btnE
//
this.btnE.Location = new System.Drawing.Point(144, 264);
this.btnE.Name = "btnE";
this.btnE.Size = new System.Drawing.Size(24, 23);
this.btnE.TabIndex = 116;
this.btnE.Text = "E";
//
//btnD
//
this.btnD.Location = new System.Drawing.Point(152, 288);
this.btnD.Name = "btnD";
this.btnD.Size = new System.Drawing.Size(24, 23);
this.btnD.TabIndex = 117;
this.btnD.Text = "D";
//
//btnK
//
this.btnK.Location = new System.Drawing.Point(272, 288);
this.btnK.Name = "btnK";
this.btnK.Size = new System.Drawing.Size(24, 23);
this.btnK.TabIndex = 118;
this.btnK.Text = "K";
//
//btnJ
//
this.btnJ.Location = new System.Drawing.Point(248, 288);
this.btnJ.Name = "btnJ";
this.btnJ.Size = new System.Drawing.Size(24, 23);
this.btnJ.TabIndex = 119;
this.btnJ.Text = "J";
//
//btnI
//
this.btnI.Location = new System.Drawing.Point(264, 264);
this.btnI.Name = "btnI";
this.btnI.Size = new System.Drawing.Size(24, 23);
this.btnI.TabIndex = 120;
this.btnI.Text = "I";
//
//btnH
//
this.btnH.Location = new System.Drawing.Point(224, 288);
this.btnH.Name = "btnH";
this.btnH.Size = new System.Drawing.Size(24, 23);
this.btnH.TabIndex = 121;
this.btnH.Text = "H";
//
//btnO
//
this.btnO.Location = new System.Drawing.Point(288, 264);
this.btnO.Name = "btnO";
this.btnO.Size = new System.Drawing.Size(24, 23);
this.btnO.TabIndex = 122;
this.btnO.Text = "O";
//
//btnN
//
this.btnN.Location = new System.Drawing.Point(240, 312);
this.btnN.Name = "btnN";
this.btnN.Size = new System.Drawing.Size(24, 23);
this.btnN.TabIndex = 123;
this.btnN.Text = "N";
//
//btnM
//
this.btnM.Location = new System.Drawing.Point(264, 312);
this.btnM.Name = "btnM";
this.btnM.Size = new System.Drawing.Size(24, 23);
this.btnM.TabIndex = 124;
this.btnM.Text = "M";
//
//btnL
//
this.btnL.Location = new System.Drawing.Point(296, 288);
this.btnL.Name = "btnL";
this.btnL.Size = new System.Drawing.Size(24, 23);
this.btnL.TabIndex = 125;
this.btnL.Text = "L";
//
//btnT
//
this.btnT.Location = new System.Drawing.Point(192, 264);
this.btnT.Name = "btnT";
this.btnT.Size = new System.Drawing.Size(24, 23);
this.btnT.TabIndex = 126;
this.btnT.Text = "T";
//
//btnS
//
this.btnS.Location = new System.Drawing.Point(128, 288);
this.btnS.Name = "btnS";
this.btnS.Size = new System.Drawing.Size(24, 23);
this.btnS.TabIndex = 127;
this.btnS.Text = "S";
//
//btnR
//
this.btnR.Location = new System.Drawing.Point(168, 264);
this.btnR.Name = "btnR";
this.btnR.Size = new System.Drawing.Size(24, 23);
this.btnR.TabIndex = 128;
this.btnR.Text = "R";
//
//btnQ
//
this.btnQ.Location = new System.Drawing.Point(96, 264);
this.btnQ.Name = "btnQ";
this.btnQ.Size = new System.Drawing.Size(24, 23);
this.btnQ.TabIndex = 129;
this.btnQ.Text = "Q";
//
//btnP
//
this.btnP.Location = new System.Drawing.Point(312, 264);
this.btnP.Name = "btnP";
this.btnP.Size = new System.Drawing.Size(24, 23);
this.btnP.TabIndex = 130;
this.btnP.Text = "P";
//
//btnY
//
this.btnY.Location = new System.Drawing.Point(216, 264);
this.btnY.Name = "btnY";
this.btnY.Size = new System.Drawing.Size(24, 23);
this.btnY.TabIndex = 131;
this.btnY.Text = "Y";
//
//btnX
//
this.btnX.Location = new System.Drawing.Point(144, 312);
this.btnX.Name = "btnX";
this.btnX.Size = new System.Drawing.Size(24, 23);
this.btnX.TabIndex = 132;
this.btnX.Text = "X";
//
//btnW
//
this.btnW.Location = new System.Drawing.Point(120, 264);
this.btnW.Name = "btnW";
this.btnW.Size = new System.Drawing.Size(24, 23);
this.btnW.TabIndex = 133;
this.btnW.Text = "W";
//
//btnV
//
this.btnV.Location = new System.Drawing.Point(192, 312);
this.btnV.Name = "btnV";
this.btnV.Size = new System.Drawing.Size(24, 23);
this.btnV.TabIndex = 134;
this.btnV.Text = "V";
//
//btnU
//
this.btnU.Location = new System.Drawing.Point(240, 264);
this.btnU.Name = "btnU";
this.btnU.Size = new System.Drawing.Size(24, 23);
this.btnU.TabIndex = 135;
this.btnU.Text = "U";
//
//btnZ
//
this.btnZ.Location = new System.Drawing.Point(120, 312);
this.btnZ.Name = "btnZ";
this.btnZ.Size = new System.Drawing.Size(24, 23);
this.btnZ.TabIndex = 136;
this.btnZ.Text = "Z";
//
//FrmTypingApplication
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
this.ClientSize = new System.Drawing.Size(472, 369);
this.Controls.Add(this.btnZ);
this.Controls.Add(this.btnU);
this.Controls.Add(this.btnV);
this.Controls.Add(this.btnW);
this.Controls.Add(this.btnX);
this.Controls.Add(this.btnY);
this.Controls.Add(this.btnP);
this.Controls.Add(this.btnQ);
this.Controls.Add(this.btnR);
this.Controls.Add(this.btnS);
this.Controls.Add(this.btnT);
this.Controls.Add(this.btnL);
this.Controls.Add(this.btnM);
this.Controls.Add(this.btnN);
this.Controls.Add(this.btnO);
this.Controls.Add(this.btnH);
this.Controls.Add(this.btnI);
this.Controls.Add(this.btnJ);
this.Controls.Add(this.btnK);
this.Controls.Add(this.btnD);
this.Controls.Add(this.btnE);
this.Controls.Add(this.btnF);
this.Controls.Add(this.btnG);
this.Controls.Add(this.btnA);
this.Controls.Add(this.btnB);
this.Controls.Add(this.btnC);
this.Controls.Add(this.btnQuestion);
this.Controls.Add(this.btnPeriod);
this.Controls.Add(this.btnComma);
this.Controls.Add(this.btnQuote);
this.Controls.Add(this.btnColon);
this.Controls.Add(this.btnRightBrace);
this.Controls.Add(this.btnLeftBrace);
this.Controls.Add(this.btnRight);
this.Controls.Add(this.btnDown);
this.Controls.Add(this.btnLeft);
this.Controls.Add(this.btnUp);
this.Controls.Add(this.btnShiftLeft);
this.Controls.Add(this.btnCaps);
this.Controls.Add(this.btnSpace);
this.Controls.Add(this.btnBackspace);
this.Controls.Add(this.btnSlash);
this.Controls.Add(this.btnEnter);
this.Controls.Add(this.btnAltLeft);
this.Controls.Add(this.btnFn);
this.Controls.Add(this.btnCtrlLeft);
this.Controls.Add(this.btnTab);
this.Controls.Add(this.btnTilde);
this.Controls.Add(this.btnPlus);
this.Controls.Add(this.btnHyphen);
this.Controls.Add(this.btn0);
this.Controls.Add(this.btn9);
this.Controls.Add(this.btn8);
this.Controls.Add(this.btn7);
this.Controls.Add(this.btn6);
this.Controls.Add(this.btn5);
this.Controls.Add(this.btn4);
this.Controls.Add(this.btn3);
this.Controls.Add(this.btn2);
this.Controls.Add(this.btn1);
this.Controls.Add(this.btnF12);
this.Controls.Add(this.btnF11);
this.Controls.Add(this.btnF10);
this.Controls.Add(this.btnF9);
this.Controls.Add(this.btnF8);
this.Controls.Add(this.btnF7);
this.Controls.Add(this.btnF6);
this.Controls.Add(this.btnF5);
this.Controls.Add(this.btnF4);
this.Controls.Add(this.btnF3);
this.Controls.Add(this.btnF2);
this.Controls.Add(this.btnF1);
this.Controls.Add(this.txtOutput);
this.Controls.Add(this.lblPrompt);
this.Font = new System.Drawing.Font("Tahoma", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)0);
this.Name = "FrmTypingApplication";
this.Text = "Typing Application";
this.ResumeLayout(false);

}

private void txtOutput_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{

switch (e.KeyData) {
case Keys.Back:
ChangeColor(btnBackspace);
break;

case Keys.Enter:
ChangeColor(btnEnter);
break;

case Keys.Tab:
ChangeColor(btnTab);
break;

case Keys.Space:
ChangeColor(btnSpace);
break;

case Keys.D0:
ChangeColor(btn0);
break;

case Keys.D1:
ChangeColor(btn1);
break;

case Keys.D2:
ChangeColor(btn2);
break;

case Keys.D3:
ChangeColor(btn3);
break;

case Keys.D4:
ChangeColor(btn4);
break;

case Keys.D5:
ChangeColor(btn5);
break;

case Keys.D6:
ChangeColor(btn6);
break;

case Keys.D7:
ChangeColor(btn7);
break;

case Keys.D8:
ChangeColor(btn8);
break;

case Keys.D9:
ChangeColor(btn9);
break;

case Keys.F1:
break;
case Keys.F2:
ChangeColor(btnF2);
break;

case Keys.F3:
ChangeColor(btnF3);
break;

case Keys.F4:
ChangeColor(btnF4);
break;

case Keys.F5:
ChangeColor(btnF5);
break;

case Keys.F6:
ChangeColor(btnF6);
break;

case Keys.F7:
ChangeColor(btnF7);
break;

case Keys.F8:
ChangeColor(btnF8);
break;

case Keys.F9:
ChangeColor(btnF9);
break;

case Keys.F10:
ChangeColor(btnF10);
break;

case Keys.F11:
ChangeColor(btnF11);
break;

case Keys.F12:
ChangeColor(btnF12);
break;

case Keys.OemOpenBrackets:
ChangeColor(btnLeftBrace);
break;

case Keys.OemCloseBrackets:
ChangeColor(btnRightBrace);
break;

case Keys.Oemplus:
ChangeColor(btnPlus);
break;

case Keys.OemMinus:
ChangeColor(btnHyphen);
break;

case Keys.Oemtilde:
ChangeColor(btnTilde);
break;

case Keys.OemPipe:
ChangeColor(btnSlash);
break;

case Keys.OemSemicolon:
ChangeColor(btnColon);
break;

case Keys.OemQuotes:
ChangeColor(btnQuote);
break;

case Keys.OemPeriod:
ChangeColor(btnPeriod);
break;

case Keys.Oemcomma:
ChangeColor(btnComma);
break;

case Keys.OemQuestion:
ChangeColor(btnQuestion);
break;

case Keys.CapsLock:
ChangeColor(btnCaps);
break;

case Keys.Down:
ChangeColor(btnDown);
break;

case Keys.Up:
ChangeColor(btnUp);
break;

case Keys.Left:
ChangeColor(btnLeft);
break;

case Keys.Right:
ChangeColor(btnRight);
break;

// if a modifier key was pressed
case (Keys)65552:
// Shift key
ChangeColor(btnShiftLeft);
break;

case (Keys)131089:
// Control key
ChangeColor(btnCtrlLeft);
break;

case (Keys)262162:
// Alt key
ChangeColor(btnAltLeft);
break;

}
txtOutput.Text // ERROR: Unknown assignment operator ConcatString
;

}


private void txtOutput_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{

txtOutput.Text // ERROR: Unknown assignment operator ConcatString
;

switch (char.ToUpper(e.KeyChar)) {

case Convert.ToChar(Keys.A):
// a key
ChangeColor(btnA);
break;

case Convert.ToChar(Keys.B):
// b key
ChangeColor(btnB);
break;

case Convert.ToChar(Keys.C):
// c key
ChangeColor(btnC);
break;

case Convert.ToChar(Keys.D):
// d key
ChangeColor(btnD);
break;

case Convert.ToChar(Keys.E):
// e key
ChangeColor(btnE);
break;

case Convert.ToChar(Keys.F):
// f key
ChangeColor(btnF);
break;

case Convert.ToChar(Keys.G):
// g key
ChangeColor(btnG);
break;

case Convert.ToChar(Keys.H):
// h key
ChangeColor(btnH);
break;

case Convert.ToChar(Keys.I):
// i key
ChangeColor(btnI);
break;

case Convert.ToChar(Keys.J):
// j key
ChangeColor(btnJ);
break;

case Convert.ToChar(Keys.K):
// k key
ChangeColor(btnK);
break;

case Convert.ToChar(Keys.L):
// l key
ChangeColor(btnL);
break;
case Convert.ToChar(Keys.M):
// m key
ChangeColor(btnM);
break;

case Convert.ToChar(Keys.N):
// n key
ChangeColor(btnN);
break;

case Convert.ToChar(Keys.O):
// o key
ChangeColor(btnO);
break;

case Convert.ToChar(Keys.P):
// p key
ChangeColor(btnP);
break;

case Convert.ToChar(Keys.Q):
// q key
ChangeColor(btnQ);
break;

case Convert.ToChar(Keys.R):
// r key
ChangeColor(btnR);
break;

case Convert.ToChar(Keys.S):
// s key
ChangeColor(btnS);
break;

case Convert.ToChar(Keys.T):
// t key
ChangeColor(btnT);
break;

case Convert.ToChar(Keys.U):
// u key
ChangeColor(btnU);
break;

case Convert.ToChar(Keys.V):
// v key
ChangeColor(btnV);
break;

case Convert.ToChar(Keys.W):
// w key
ChangeColor(btnW);
break;

case Convert.ToChar(Keys.X):
// x key
ChangeColor(btnX);
break;

case Convert.ToChar(Keys.Y):
// y key
ChangeColor(btnY);
break;

case Convert.ToChar(Keys.Z):
// z key
ChangeColor(btnZ);
break;

}

}

private void txtOutput_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{

ResetColor();
}
// txtOutput_KeyUp

private void ChangeColor(Button btnButton)
{

ResetColor();
btnButton.BackColor = Color.Red;
m_btnLastButton = btnButton;
}
// ChangeColor

private void ResetColor()
{

if ((m_btnLastButton == null) == false) {
m_btnLastButton.BackColor = Control.DefaultBackColor;

}
}
}
 
Geri
Üst