Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VB brain not active

  • 11-08-2003 04:22PM
    #1
    Registered Users, Registered Users 2 Posts: 2,589 ✭✭✭


    Im developing a touchscreen based application with which I want to use the Microsoft on-screen keyboard osk.exe. I need it to show on pressing of a command button but it wont call it at all. Any ideas? I have this strange feeling im looking too deep and this is a simple problem and I cant figure it out,

    Any help appreciated
    Ger


Comments

  • Registered Users, Registered Users 2 Posts: 629 ✭✭✭str8_away


    what command are you using to call osk.exe?


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    This works on Win2k with vb6 for me.
    Shell "C:\WINNT\system32\osk.exe", vbNormalFocus
    


    Failing that use the ShellExecute API call :)


  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Originally posted by Evil Phil
    This works on Win2k with vb6 for me.

    Shell "C:\WINNT\system32\osk.exe", vbNormalFocus
    


    Failing that use the ShellExecute API call :)

    Shell or the ShellExecute API should both work. You can't rely on the systems directory being called C:\WINNT\ system32 though. No worries though, since that directory (whatever it is called on a given machine) will be in the PATH system variable, so the following should do the trick:
    Shell "osk.exe", vbNormalFocus
    


  • Registered Users, Registered Users 2 Posts: 2,589 ✭✭✭gerire


    I tried Shell earlier and it didn't work, must have been a syntax mix up on my part.

    Cheers guys this line works perfectly. It was really wrecking my head. Thanks again
    Ger


Advertisement