Cool-LV Posted April 10, 2006 Report Share Posted April 10, 2006 Anybody knows how can I disable/restore keyboard and mouse function ? and set keyboard 'Caps Lock" (replace press Caps Lock key manually) with LV ? Quote Link to comment
Aitor Solar Posted April 10, 2006 Report Share Posted April 10, 2006 You can use the Windows API to simulate keystrokes, use user32.dll (keybd_event), there are examples in ni.com. As to disable mouse / keyboard, probably there's a similar method but I don't know it. You can change mouse cursor to an empty image, so the result would be almost the same. Saludos, Aitor Quote Link to comment
Cool-LV Posted April 10, 2006 Author Report Share Posted April 10, 2006 You can use the Windows API to simulate keystrokes, use user32.dll (keybd_event), there are examples in ni.com. As to disable mouse / keyboard, probably there's a similar method but I don't know it. You can change mouse cursor to an empty image, so the result would be almost the same.Saludos, Aitor thanks Entropy, I think a simple sample will help me better. anybody can help ? thanks @! Quote Link to comment
Aitor Solar Posted April 10, 2006 Report Share Posted April 10, 2006 thanks Entropy, I think a simple sample will help me better. anybody can help ? thanks @! OK, here you have an example of simulating a keystroke. But as I said, if you just type "simulate keyboard" or "simulate keystroke" in the ni.com search, you will find more. The same applies for the cursor change, is not so difficult. Saludos, Aitor Download File:post-1450-1144673625.vi Quote Link to comment
JDave Posted April 10, 2006 Report Share Posted April 10, 2006 Anybody knows how can I disable/restore keyboard and mouse function ? and set keyboard 'Caps Lock" (replace press Caps Lock key manually) with LV ? LabVIEW cannot do this directly. Your best bet is to search for ways to do this in the operating system, and then call them from LabVIEW. Aitor gave you a start this direction. I don't think there is an API for this in Windows, though I know that programs can be written to accomplish this. See this url Toddler Keys for a novel application that locks your system against toddlers. :thumbup: David Quote Link to comment
Cool-LV Posted April 11, 2006 Author Report Share Posted April 11, 2006 OK, here you have an example of simulating a keystroke. But as I said, if you just type "simulate keyboard" or "simulate keystroke" in the ni.com search, you will find more. The same applies for the cursor change, is not so difficult.Saludos, Aitor Aitor Solar, Wow, I don't know which words can tell my appreciation for you. thanks very much. it is great and enough help me. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.