Reason for my vote of 1
I agree with the others, copying a code snippet from MSDN and pasting it as a tip here is of no value. Eventually, we'll just end up with a copy of MSDN in another location.
Just becoz u knew it b4hand, doesn't mean everybody knows it.. there r lot of ppl who searches in code project for solutions, u should keep it in your mind!!
Reason for my vote of 5
Good reference. If I used this, I would allow VK_NUMLOCK to be passed in as a parameter, so that the function could be used for any key on the keyboard.
I had the code saved long time ago in a text file, and after so many years, I wasn't aware of the proper link.
Thanx for the source.
You might say it's plagiarism, but then I can say a code like while(GetMessage(&msg)){TranslateMessage(&msg); DispatchMessage(&msg);} is also plagiarism...
I think as long as I am not claiming this code is mine, it shouldn't be called plagiarism..
But before suggesting this "as a tip" you should have at least looked at MSDN to read something about keybd_event function to be sure it still may be used or is already deprecated!
Otherwise it would be unrespect to all who will read your tip...
Well, and then (after had looked at MSDN you saw the exactly same code you were going to suggest)