
EnableHardwareInput API Problem in VB4.0
I am developing an application in a Windows 3.1 environment utilizing
Visual Basic 4.0 (Professional Edition - 16 bit). The application I am
developing uses the SSTAB control. In an attempt to prevent multiple
mouse clicks or accelerator key presses from interfering with my code in
the SSTAB control click event I would like to suppress total keyboard
input as I enter the click event and restore keyboard input when I exit.
I tried using the EnableHardwareInput API to achieve this and all works
well except:
1. The first time I use the mouse to click elsewhere I need to depress
the button twice instead of just once as is usual.
2. When I exit my application, all keyboard keys except the ESC and the
space bar are inoperable.
Am I missing something here? Is there a way to make sure that the
keyboard is properly initialized when exiting the SSTAB click event?