TextBox调用系统软键盘

 /// <summary>
        /// 文本框焦点
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ddd(object sender, RoutedEventArgs e)
        {
            Process.Start(@"C:\WINDOWS\system32\osk.exe");
            
           
        }

        /// <summary>
        /// 文本框失去焦点
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TextBox_LostFocus_1(object sender, RoutedEventArgs e)
        {
            var aa= Process.GetProcessesByName("osk");
            foreach(Process item in aa)
            {
                if (item.ProcessName == "osk")
                {
                    item.Kill();
                }
            }
            
        }

 

posted @ 2013-01-14 00:30  沙漠绿洲uibe  阅读(379)  评论(0编辑  收藏  举报