m_nathani Posted June 9, 2003 Posted June 9, 2003 Hi Everybody I have write code to navigate record with Ctrl and arrow key. i have tabcontrol on forms with three tabpages. when i press ctrl and left or right key my tabpages also change. i don't want to changed tabpage. Thanks Quote
Leaders dynamic_sysop Posted June 9, 2003 Leaders Posted June 9, 2003 this will stop users being able to use ctrl and an arrow key to scroll through the tabs Private Sub TabControl1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TabControl1.KeyDown If e.KeyCode = 17 Or e.KeyCode = 37 Or e.KeyCode = 39 Then Button1.Focus() End If End Sub Private Sub TabControl1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TabControl1.KeyUp If e.KeyCode = 17 Or e.KeyCode = 37 Or e.KeyCode = 39 Then Button1.Focus() End If End Sub note : i am setting focus to another object ( a button in this case ) hope this helps. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.