How to control mouse and keyboard?
-
Hello, I'm using VB.net with NET 2.0. I would be most grateful if you could post answer to all or any of the following questions. How to: 1. Use custom icon for mouse instead of deafult mouse cursor? 2. How to disable all the other mouse buttons than the left button? Some mice have 3 buttons, some have five or more. 3. How to disable the function keys (F1, F2 and so on)? 4. How to disable Windows-key (the kye between to Alt and Ctrl) 5. How to disable "Menu-key" (the one between AltGr and Ctrl)? 6. How to hide Windows taskbar completely? 7. How to disable (from code) all 8. How to disable Ctrl+Alt+Del? 9. How to disable all Windows accessibility settings (for handicapped people) from code? This should happen in a way that when the user closes my application normal Windows operation will be restored.
-
Hello, I'm using VB.net with NET 2.0. I would be most grateful if you could post answer to all or any of the following questions. How to: 1. Use custom icon for mouse instead of deafult mouse cursor? 2. How to disable all the other mouse buttons than the left button? Some mice have 3 buttons, some have five or more. 3. How to disable the function keys (F1, F2 and so on)? 4. How to disable Windows-key (the kye between to Alt and Ctrl) 5. How to disable "Menu-key" (the one between AltGr and Ctrl)? 6. How to hide Windows taskbar completely? 7. How to disable (from code) all 8. How to disable Ctrl+Alt+Del? 9. How to disable all Windows accessibility settings (for handicapped people) from code? This should happen in a way that when the user closes my application normal Windows operation will be restored.
re infecta wrote:
1. Use custom icon for mouse instead of deafult mouse cursor?
You have to create a custom cursor file (*.CUR), drawing the image and creating the hotspot point for the spot when the mouse clicks. Google for "Create custom cursor file" for software that can do this. Put the file in your apps resources, then you can set the cursor to your custom cursor using something like:
Me.Cursor = New Cursor(Me.GetType(), "MyCursor.Cur")
re infecta wrote:
2. How to disable all the other mouse buttons than the left button? Some mice have 3 buttons, some have five or more.
In only your application or acrossed entire system? If it's just your app, then you just ignore the button click. If it's system wide, you need to write a global mouse hook. Good for "VB.NET mouse hook" for examples.
re infecta wrote:
3. How to disable the function keys (F1, F2 and so on)?
Again, in your application only, or for the entire system?? Google for "VB.NET Keyboard hook" if it's the entire system.
re infecta wrote:
4. How to disable Windows-key (the kye between to Alt and Ctrl)
Keyboard hook.
re infecta wrote:
5. How to disable "Menu-key" (the one between AltGr and Ctrl)?
Keyboard hook.
re infecta wrote:
6. How to hide Windows taskbar completely?
You can't get rid of the task bar completely. You can only set it's options to NOT be on top of all other widows. Right-click the task bar, Properties, turn off "Always on top".
re infecta wrote:
7. How to disable (from code) all
What?
re infecta wrote:
8. How to disable Ctrl+Alt+Del?
You can't. It's impossible to block this key combination.
re infecta wrote:
9. How to disable all Windows accessibility settings (for handicapped people) from code?
You don't. This is something that's left up to system group policies. Look... All these questions lead me to believe your trying to run Windows in a Kiosk mode. Get the Windows XP Resource Kit and it'll explain how to set this up.