in reply to Re^3: Sending a message to Win32 Dialog in background.
in thread Sending a message to Win32 Dialog in background.

As the alternative, you could try to send the keyboard messages directly to the appropriate window instead of using SendKeys. This will not always work in a convenient way, as the keycodes and keyboard states do not necessarily translate into Windows messages.