本文整理汇总了C#中System.Windows.Forms.KeyEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# KeyEventArgs类的具体用法?C# KeyEventArgs怎么用?C# KeyEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KeyEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了KeyEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: txtBankCode_KeyDown
private void txtBankCode_KeyDown(object sender, KeyEventArgs e)
{
frmSelectBank frm = new frmSelectBank();
// Add an event handler to update this form
frm.SelectBankUpdate +=new frmSelectBank.SelectBankHandler(frm_SelectBankUpdate);
frm.Show();
}
示例2: TextAreaKeyEventHandler
/// <summary>
/// Return true to handle the keypress, return false to let the text area handle the keypress
/// </summary>
void TextAreaKeyEventHandler(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.OemOpenBrackets && e.Shift)
{
ICompletionDataProvider snippetDataProvider = new SnippetDataProvider(mainForm.AutoCompleteImageList);
codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow(
mainForm, // The parent window for the completion window
editor, // The text editor to show the window for
"", // Filename - will be passed back to the provider
snippetDataProvider, // Provider to get the list of possible completions
Convert.ToChar(e.KeyCode) // Key pressed - will be passed to the provider
);
}
else
{
ICompletionDataProvider completionDataProvider = new CodeCompletionProvider(mainForm.AutoCompleteImageList);
codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow(
mainForm, // The parent window for the completion window
editor, // The text editor to show the window for
"", // Filename - will be passed back to the provider
completionDataProvider, // Provider to get the list of possible completions
Convert.ToChar(e.KeyCode) // Key pressed - will be passed to the provider
);
}
if (codeCompletionWindow != null)
{
// ShowCompletionWindow can return null when the provider returns an empty list
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
}
return;
}
示例3: FormViewerMARKETING_KeyUp
private void FormViewerMARKETING_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
Close();
}
}
示例4: DownKey
public override void DownKey(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter && !btnSave.Focused)
SendKeys.Send("{Tab}");
else if (e.KeyCode == Keys.F9)
btnSave_Click(sender, e);
}
示例5: button5_KeyDown
private void button5_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData==Keys.Right)
{
wplayer.controls.fastReverse();
}
}
示例6: TemplateName_KeyDown
private void TemplateName_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter) {
this.DialogResult = DialogResult.OK;
this.Close();
}
}
示例7: textBoxQuantity_KeyDown
private void textBoxQuantity_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
this.textBoxBarCode.Focus();
}
}
示例8: txtTitle_KeyDown
private void txtTitle_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
btnOkay_Click(null, null);
}
}
示例9: numJug_KeyDown
private void numJug_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
this.Iniciar();
}
}
示例10: MaskedTextBoxKeyDown_KeyDown
private void MaskedTextBoxKeyDown_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
SendKeys.Send("{TAB}");
}
}
示例11: txtPassword_KeyDown
private void txtPassword_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
btnLogin_Click(null, null);
}
}
示例12: ContrasenatextBox_KeyDown
private void ContrasenatextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
IniciarSesion();
}
}
示例13: lvProgramm_KeyDown
private void lvProgramm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
RemoveSelected();
}
}
示例14: FormKeyUp
private void FormKeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
this.Close();
}
}
示例15: dgSalesOrder_KeyDown
private void dgSalesOrder_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
e.SuppressKeyPress = true;
//LL Phalaborwa if
if (dgSalesOrder.Rows.Count > 0)
{
sResult = dgSalesOrder.SelectedRows[0].Cells[0].Value.ToString();
this.DialogResult = DialogResult.OK;
this.Close();
}
}
else
{
//if (e.KeyValue > 40)
//{
// e.SuppressKeyPress = true;
// txtSalesNumber.Text += char.ConvertFromUtf32(e.KeyValue).ToString();
// txtSalesNumber.Focus();
// txtSalesNumber.SelectionStart = txtSalesNumber.Text.Length;
// txtSalesNumber.SelectionLength = 0;
//}
}
}