Friday 20 September 2013

C# - Launch a windows 7 keyboard in Winforms.

From this article we can see how to launch a windows 7 virtual keyboard in winforms application , for this we take a example that on the click of textbox , windows 7 virtual keyboard should launch.

Code :

        public Form1()
        {
            InitializeComponent();        
        }

        private void textBox1_MouseClick(object sender, MouseEventArgs e)
        {
            string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink";
            string keyboardPath = Path.Combine(progFiles, "TabTip.exe");
            Process.Start(keyboardPath);
        }

Output: