Cancelling the PgDown key at a combo box

  • Thread starter Thread starter giannis
  • Start date Start date
G

giannis

Is possible to cancel completely the PgDown behavior at a combo box
(Simple,Suggest)?
 
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 !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top