Microsoft Developer Network > 포럼 홈 > .NET Base Class Library > How do I detect whether touchscreen or mouse?
질문하기질문하기
 

질문How do I detect whether touchscreen or mouse?

  • 2009년 11월 5일 목요일 오후 5:16tairon 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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

모든 응답

  • 2009년 11월 7일 토요일 오전 8:21Jai Mallesh Babu 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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
    • 답변으로 표시됨eryangMSFT, 중재자2009년 11월 12일 목요일 오전 7:38
    • 답변으로 표시 취소됨tairon 2009년 11월 19일 목요일 오후 1:18
    •  
  • 2009년 11월 19일 목요일 오후 1:28tairon 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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
  • 2009년 11월 25일 수요일 오전 10:20eryangMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    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.