Mouse and Keybaord
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Thread: Mouse and Keybaord

  1. #1
    Join Date
    Dec 2012
    Posts
    7

    Post Mouse and Keybaord

    I need program made in vb6 to detect when mouse and keyboard are connected or not.

  2. #2
    Join Date
    Dec 2012
    Posts
    7

    Re: Mouse and Keybaord

    I will really appreciated if someone can help me. thank you very much

  3. #3
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,960

    Re: Mouse and Keybaord

    Detection is different then telling you WHEN IT DISCONNECTS, which is probably more of what you would like. Provide a LOT more information, if you expect anyone to know what you want to do.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Dec 2012
    Posts
    7

    Re: Mouse and Keybaord

    Yeah thank you this what i need to do.. i need function to detect when my keyboard is connected or not. for example when my keyboard is disconnect it will show a msg that the keyboard has been unplugged and msg when its disconnect again..thank you very much

  5. #5
    Join Date
    Dec 2012
    Posts
    7

    Re: Mouse and Keybaord

    I am only using vb6 so i need function that is compatible in vb6 thank you very much i will really appreciated it if you can help me.. Godbless

  6. #6
    Join Date
    Dec 2012
    Posts
    7

    Re: Mouse and Keybaord

    I making a program that will lock the screen when the keyboard get disconnected and unlock the screen when the keyboard connect again

  7. #7
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,090

    Re: Mouse and Keybaord

    This is not the correct way going about this. why lock the screen if there is no input device?

    Anyways, if it is a usb mouse and a usb keyboard, you might be able to use the RegisterDeviceNotification API to detect insertion or removal. I have done it with USB drives - and it should work similar.

  8. #8
    Join Date
    Dec 2012
    Posts
    7

    Re: Mouse and Keybaord

    Thank you Sir. i just lock the system by a screen saver using vb6 i am new in vb6 im still learning thank you for sharing

  9. #9
    Join Date
    Dec 2012
    Posts
    7

    Re: Mouse and Keybaord

    or msgbox when keyboard/mouse is unplugged of plugged again pls help..... thank you

  10. #10
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,090

    Re: Mouse and Keybaord

    I thought you would have googled already, based on my previous advice....

    Anyways, have a decent read through this article I wrote some time ago :

    VB 6 and USB Flash Disks
    http://www.codeguru.com/vb/gen/vb_sy...cle.php/c14935

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center