For the current application I am working on I want to simulate a combo box using my own custom control as I want it to be multi column and have some additional functionality. I am using a text box and a datagridview to do this.
I want to replicate the suggest/append that can be used with a regular combo box. I've got this working great. The user can begin to type, gets a list of suggestions and can use the up and down keys to scroll through entries.
I have already trapped the enter key to take the selected row as the value. This works perfectly but I would also like to trap the tab key and do the same, much like the functionality already embedded in a combo box control.
The problem is that, obviously vb.net uses the tab key to change the selected control and this fires before I can call my subroutine to take the selected row from my datagridview. I want to be able to cancel tabbing out of the control, or at least find a way to fire my code before it does.
Thanks in advance.