First of all, i have successfully install my application in Windows 7 and it run correctly, which means i can use tab or enter key to move to the next control.
After a week, it suddenly cannot focus from one control to another either by press on tab key on enter key. I always have to click to get focus. Can somebody help me regarding this issue?
I use the code below in my application to move to onether control when enter key is pressed.
Expand|Select|Wrap|Line Numbers
- Public Sub EnterAsTab(KeyAscii As Integer)
- If KeyAscii = 13 Then
- keybd_event VK_TAB, 0, 0, 0 'send a tab
- KeyAscii = 0
- End If
- end sub