Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 924315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:19:59+00:00 2026-05-15T19:19:59+00:00

I have been working on a touch screen application. I need to know if

  • 0

I have been working on a touch screen application. I need to know if there exists a ready touch screen keyboard that I can use as a Controller for my application.

I tried using the windows ready keyboard but it is too small for a touch screen.

Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.System) + Path.DirectorySeparatorChar + "osk.exe");

any ideas how to start building one in minimal time will be greatly appreciated….

New Question

I have copied this code from someone and did some modifications to it :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;


 class Win32
{
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
public static extern bool SetWindowPos(
int hWnd, // window handle
int hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
uint uFlags); // window positioning flags
public const int HWND_BOTTOM = 0x0001;
public const int HWND_TOP = 0x0000;
public const int SWP_NOSIZE = 0x0001;
public const int SWP_NOMOVE = 0x0002;
public const int SWP_NOZORDER = 0x0004;
public const int SWP_NOREDRAW = 0x0008;
public const int SWP_NOACTIVATE = 0x0010;
public const int SWP_FRAMECHANGED = 0x0020;
public const int SWP_SHOWWINDOW = 0x0040;
public const int SWP_HIDEWINDOW = 0x0080;
public const int SWP_NOCOPYBITS = 0x0100;
public const int SWP_NOOWNERZORDER = 0x0200;
public const int SWP_NOSENDCHANGING = 0x0400;
}


namespace Keyboard
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.KeyText.MouseDoubleClick += new MouseEventHandler(KeyText_MouseDoubleClick);

        }
        private Process process;
        private string getKeyboardText()
        {
            KeyScreen k = new KeyScreen();
            k.ShowDialog();
            if (k.DialogResult.ToString().Equals("OK"))
                return k.Text1;
            else
                return null;
        }

        void KeyText_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.KeyText.Text = getKeyboardText();
        }

        private void KeyBtn_Click(object sender, EventArgs e)
        {

            this.showKeypad();

            //Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.System) + Path.DirectorySeparatorChar + "osk.exe");
        }
        private void showKeypad()
        {
            Process process = new Process();
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError = true;
            process.StartInfo.CreateNoWindow = true;
            process.StartInfo.FileName = "c:\\Windows\\system32\\osk.exe";
            process.StartInfo.Arguments = "";
            process.StartInfo.WorkingDirectory = "c:\\";
            process.Start(); // Start Onscreen Keyboard
            process.WaitForInputIdle();
            Win32.SetWindowPos((int)process.MainWindowHandle,
            Win32.HWND_BOTTOM,
            300, 300, 1200, 600,
            Win32.SWP_SHOWWINDOW | Win32.SWP_NOZORDER);


        }



    }
}

This works just fine I have a nice keypad (good size for a touch screen), However, i am not familiar with C# and VB at all…. change the Text in a textbox according to the touch screen keyboard I show.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:19:59+00:00Added an answer on May 15, 2026 at 7:19 pm

    To create your own on screen keyboard you basically need to do the following.

    1- Create a windows keyboard application that you can interact with but does not steal the input focus from the current control in which every application you where currently working.

    2- The keyboard application should send key presses to the currently active control in response to clicking of buttons in the keyboard application.

    The following answer I provided previously provides a simple demonstration of how to do this using WinForms.

    C# – Sending keyboard events to (last) selected window

    Basically the window is created with the WS_EX_NOACTIVATE style, which prevents the window from becomming active and steeling input focus. Then in response to button clicks it uses SendKeys to send the approriate key press message to the control that has input focus.

    The following answer shows how to apply the WS_EX_NOACTIVATE style to a WPF application.

    Trying to create a WPF Touch Screen Keyboard Appliaction, Can't get WPF App to Send Keys to another window? Any suggestions?

    There are other solutions other than WS_EX_NOACTIVATE, but this is simple and only suffers from a minor presentational glitch when dragging the window arround. Which with some clever message processing can be overcome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a wrapper for a COM object that can only
I have been attempting to have a object that I can use across multiple
I have been working with a string[] array in C# that gets returned from
I have been working on some legacy C++ code that uses variable length structures
I have been working on a childish little program: there are a bunch of
I have been working on a project that dynamically creates a javascript file using
I have been working on a web services related project for about the last
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
We have been working with CVS for years, and frequently find it useful to
I have been working with relational databases for sometime, but it only recently occurred

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.