How do you think this will work?
In your original post, you want to trigger a keypress when the mouse button is clicked - DBPro will only detect the mouse button if it's the program with focus, and because it has focus, any key event you create will automatically be passed to your DBPro window.
Now you say that you want to affect another program. Either that program will have focus, stopping DBPro from getting mouse clicks, or your DBPro program will have focus, stopping your game from getting your simulated keyboard clicks.