 |
|
|
Recommend Sendkeys Replacement for VB5 / VB6 2.00 |
|
The Visual Basic Sendkeys sub has never been 100% reliable. With Windows Vista on the horizon, its days are numbered. If you don't believe us, download the Internet Explorer 7 beta and try Sendkeys with it. The only reliable way for VB5 / VB6 programers to send keys in the future will be to use the Windows API, keybd_event function and that can mean a huge amount of re-coding.
Fortunately, M8 can provide a much easier solution.
Keysend.bas is a VB5 module which wraps Keybd_event into a new sub Sendkey. Sendkey is a direct replacement for the VB Sendkeys. To use it, all you have to do is add the module to your project then replace "Sendkeys" with "Sendkey" in your code. Sendkey interprets all Sendkeys parameters without modification. The demo is a compiled program which allows you to test Sendkey and compare the results with the old VB Sendkeys. The send buttons send to whichever window had the focus immediately before they were clicked, so you can test send to any application.
In addition to fixing Sendkeys problems, Sendkey also includes the following features not available in the VB Sendkeys:
1. It can send the PrtScr key
2. You can specify that numbers are from the numeric keypad
3. You can set the state of the capslock, numlock and scrollock keys
Sendkeys Replacement for VB5 / VB6 info
|
|
|
|
 |