none
How To set Virtual keyboard to Numeric only on tablet mode for TextBox? VB.Net RRS feed

  • Question

  • I've been searching for an answer for years now. I mean its 2020. Every answer says call: Process.Start(osk)

    In Android World, you can customize the keyboard any way you want. If you want to add Done Button, Go button you can.

    Here is what i'm looking for: when a user enter his phone number in a masked TEXTBOX, the whole keyboard pops

    up.

    The numeric Keyboard should pop up instead. By the way, Windows should detect it automatically since the

    textbox is masked as a phone number. The small things matter, this what makes user experience horrible. Now

    the user has to click on numbers only, then add the phone number. I could make my own, but that's degrading to

    to windows. And i love Microsoft.

    Anyone knows the answer please let me know. I'll send you a present. Thanks Mark


    Friday, January 3, 2020 3:27 AM

All replies

  • Hi,

    This is an article which use a numeric keypad as an example of how to create a touchscreen interface.

    In this demo, it treats the touch screen as a mouse event (MouseUp event).

    Hope it be helpful.

    Best Regards,

    Julie


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 6, 2020 8:33 AM
    Moderator
  • It looks as though there is no way to have only the numeric keypad shown with OSK.exe.

    There is an option to show the numeric pad and it is saved in the registry.

    It appears that is all the OSK.exe will do. No option to show only the numeric keypad.

    HKEY_CURRENT_USER\Software\Microsoft\Osk\ShowNumPad

    So you could either set the option in the registry and then show the keyboard with the numeric pad showing along with the keyboard or not. You cant show only the numerickeypad.

    So you could set the registry to show the number pad before you open OSK.exe. Or maybe use sendkeys to set the option after opening.

    If it was me I would make my own.

    Monday, January 6, 2020 10:46 AM
  • Being it's 2020 and technologies and windows has changed Microsoft has too. Microsoft has made it difficult to do this in Windows forms but not with UWP (Universal Windows Platform) projects as per this page. Then there is WPF which can invoke the keyboard via a custom control. Many developers have also gone to web based apps and use libraries such as this one.

    None of the above help you but thought it would be good to put this out there to know there are other options.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Monday, January 6, 2020 11:41 AM
    Moderator
  • Hi,

    Yes, when using osk, you can only choose whether to make osk display the numeric keypad.

    But it does not allow osk to display only the numeric keyboard.

    Best Regards,

    Julie


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 7, 2020 1:24 AM
    Moderator