Results 1 to 4 of 4

Thread: Touchscreen

  1. #1

    Thread Starter
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553

    Question

    Hi,

    I'm writting a GUI for an embedded PC with a touchscreen. Since I need sometimes some user input, I decided to write a software keyboard program, since there's no external keyboard present.
    Everything works with the standard VB routines as long as I stay in the same VB project.
    But what if I want to use it also with other programs, like Windows itself?
    Should I use GetAsyncKeyState()? That's all I found for now on.

  2. #2
    Guest
    You mean detecting keypresses outside of your program? If so then yes, GetAsyncKeyState() will work.

  3. #3
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    If you want to create a virtual keyboard, take a look at SetKeyboardState(), it will allow you to set all the key states on the keyboard appriopriatly

    See http://www.vbapi.com
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  4. #4

    Thread Starter
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553

    Cool

    No, SetKeyboardState() only allows us to manipulate the VK_... constants, like NumLock, F1, NUMPAD2, ..., not the ANSI charset.
    GetAsyncKeyState() does the thing. I found some examples how to use it, but sometimes I received some weird chars, i.e. after opening Notepad and typing some chars, then returning to my program, I saw a large prefix string before my chars typed.

Posting Permissions

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



Click Here to Expand Forum to Full Width