Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   C Sharp Keydown short cut problem CTRL+S getts fired when S is pressed (http://www.go4expert.com/forums/c-sharp-keydown-short-cut-ctrls-getts-t21886/)

Mr.President 25Apr2010 13:52

C Sharp Keydown short cut problem CTRL+S getts fired when S is pressed
 
Code:


  if
 (e.KeyCode == Keys.S && e.Modifiers == Keys.Control)

  {

    a_gui.Search.frmItemSearch px = new
 a_gui.Search.frmItemSearch();

    if
 (px.ShowDialog() == DialogResult.OK)

    {

    cboMet.SelectedValue = b_bis.material_bis.smid;<b

    this
.ActiveControl = cboMet;<br/>

    }

  }

I am trying to use the CTRL + S key to call a dialog box in a textbox's keydown event but when I press "S" automatically the dialog box opens ?

How do I assign CTRL + S short cut for that text box ?

shabbir 25Apr2010 14:44

Re: C Sharp Keydown short cut problem CTRL+S getts fired when S is pressed
 
Check Modifiers and see why it is matching with Keys.Control


All times are GMT +5.5. The time now is 04:53.