Cancelling the PgDown key at a combo box

  • Thread starter Thread starter giannis
  • Start date Start date
Is possible to cancel completely the PgDown behavior at a combo box
(Simple,Suggest)?

In the KeyDown event, check to see if the key is PageDown. If it is,
then set the Handled property of the KeyEventArgs to true. At least
that's the simplest way I can think of

Private Sub SomeComboBox_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles SomeComboBox.KeyDown
If e.KeyCode = Keys.PageDown Then
e.Handled = True
End If
End Sub
 
jayeldee said:
In the KeyDown event, check to see if the key is PageDown. If it is,
then set the Handled property of the KeyEventArgs to true. At least
that's the simplest way I can think of

Thank you very much !!!
 
Back
Top