how can i do so that my compiled visual basic express program will act like this:
whenever the user press the enter key on the keyboard, a sub is called
Add this to the target control's KeyDown and KeyPress event handler
(global)
Dim k
(KeyDown)
k = e.Key
(KeyPress)
If e.Key = Keys.Enter Then SomeSub()
where SomeSub() is your method.
interior the present style properties, set its default button to the button you have chose to be clicked, subsequently the enter experience will call that button click action. Or, this is truly helpful to set the activities of the textbox itself
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
Add this to the target control's KeyDown and KeyPress event handler
(global)
Dim k
(KeyDown)
k = e.Key
(KeyPress)
If e.Key = Keys.Enter Then SomeSub()
where SomeSub() is your method.
interior the present style properties, set its default button to the button you have chose to be clicked, subsequently the enter experience will call that button click action. Or, this is truly helpful to set the activities of the textbox itself