1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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

Discussion in 'C#' started by Mr.President, Apr 25, 2010.

  1. Mr.President

    Mr.President New Member

    Joined:
    Apr 25, 2010
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    0
    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 ?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Check Modifiers and see why it is matching with Keys.Control
     

Share This Page