locked
How do I detect whether touchscreen or mouse? RRS feed

  • Question

  • Hi, I hope this is the right forum for this question.

    Is there anyway to detect if the user is using touchscreen or mouse on XP/Vista/Windows 7?

    I found the StylusAsyncPlugin examples which is supposed to work with xp tablet or vista+. but the App is not using forms and I can't find a way to make it work without it.

    I'm using the XNA framework and .net 3.5 no Forms or xaml.

    /Christoffer
    Thursday, November 5, 2009 5:16 PM

Answers

  • Hi,

    For XNA issue, you may post it at http://forums.xna.com/forums/50.aspx where you will get quicker and better support.

     

    Thanks,

    Eric


    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    • Marked as answer by eryang Tuesday, December 1, 2009 2:52 AM
    Wednesday, November 25, 2009 10:20 AM

All replies

  • Hi Tairon,

    See if this code project sample helps for touchscreen events:

    Touchscreen Keyboard UserControl:
    http://www.codeproject.com/KB/miscctrl/touchscreenkeyboard.aspx

    Regards,
    Jai
    • Marked as answer by eryang Thursday, November 12, 2009 7:38 AM
    • Unmarked as answer by tairon Thursday, November 19, 2009 1:18 PM
    Saturday, November 7, 2009 8:21 AM
  • Hi Jai,

    Thank you for your reply. Sadly it does not help. In the mentioned project there using form controls with mouse click events.
    I'm using XNA and the problem is that XNA doesn't recieve that your touching the screen unless your moving your finger(draging). At least this is what happens on the test device I'm using, a ASUS eeetop. So the only way I've managed to get clicks working on the thouchscreen is by detecting when the "mouse" moved and setting that as a click. And doing that doesn't work very well when using a mouse.

    regards,
    Christoffer
    Thursday, November 19, 2009 1:28 PM
  • Hi,

    For XNA issue, you may post it at http://forums.xna.com/forums/50.aspx where you will get quicker and better support.

     

    Thanks,

    Eric


    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    • Marked as answer by eryang Tuesday, December 1, 2009 2:52 AM
    Wednesday, November 25, 2009 10:20 AM