Daniel N wrote:
In my never ending search for keyboard simulation I found this code;
http://www.developerfusion.co.uk/show/68/2/
However, when I copy and paste, I get the errors;
'KeyCodeConstants is not defined'
and
'vbKeyShift is not declared'
What do I do to make them work?
The code on that webpage is VB6. How can I tell? The first line - the
last two parameters to the API call (which are DWORD and ULONG_PTR, 32
bit integers) are declared as Long. Only in VB6 is a Long a 32 bit integer.
So you will have to translate this sample slightly to make it usable in
VB.NET. The VB6 KeyCodeConstants enumeration has become the Keys
enumeration in System.Windows.Forms; vbKeyShift has become Shift;
vbKeyCtrl has become Ctrl. You'll also want to fix that Declare to use
Int32s rather than Longs.
--
Larry Lard
la*******@googlemail.com
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version