private void pictureBoxKeyboard_MouseClick(object sender, MouseEventArgs e) { Single xpos = e.X; Single ypos = e.Y; xpos = 993 * (xpos / pictureBoxKeyboard.Width); ypos = 282 * (ypos / pictureBoxKeyboard.Height); if (pvtKeyboardType == BoW.Kids) { pvtKeyboardKeyPressed = HandleKidsMouseClick(xpos, ypos); } else { pvtKeyboardKeyPressed = HandleTheMouseClick(xpos, ypos); } KeyboardEventArgs dea = new KeyboardEventArgs(pvtKeyboardKeyPressed); OnUserKeyPressed(dea); }
private void keyboardcontrol_UserKeyPressed(object sender, KeyboardEventArgs e) { SendKeys.Send(e.KeyboardKeyPressed); }
protected virtual void OnUserKeyPressed(KeyboardEventArgs e) { if (UserKeyPressed != null) UserKeyPressed(this, e); }
private void pictureBoxKeyboard_MouseClick(object sender, MouseEventArgs e) { Single xpos = e.X; Single ypos = e.Y; xpos = 993 * (xpos / pictureBoxKeyboard.Width); ypos = 282 * (ypos / pictureBoxKeyboard.Height); if (pvtKeyboardType == BoW.Kids) pvtKeyboardKeyPressed = HandleKidsMouseClick(xpos, ypos); else pvtKeyboardKeyPressed = HandleTheMouseClick(xpos, ypos); KeyboardEventArgs dea = new KeyboardEventArgs(pvtKeyboardKeyPressed); OnUserKeyPressed(dea); }