C# 調用(呼叫/Call) 螢幕鍵盤(軟體螢幕小鍵盤/software keyboard)
C# 調用(呼叫/Call) 螢幕鍵盤(軟體螢幕小鍵盤/software keyboard)
資料來源: https://king39461.pixnet.net/blog/post/269212447
https://dotblogs.com.tw/shuinvy/2013/09/14/118490
https://social.msdn.microsoft.com/Forums/vstudio/en-US/3cf45aac-fab9-45f0-b416-cc504daf71da/processstart-elevation-and-uac?forum=csharpgeneral
開啟螢幕鍵盤
private void pic001_Click(object sender, EventArgs e) { //https://social.msdn.microsoft.com/Forums/vstudio/en-US/3cf45aac-fab9-45f0-b416-cc504daf71da/processstart-elevation-and-uac?forum=csharpgeneral Process process = new Process(); process.StartInfo.UseShellExecute = true; process.StartInfo.WorkingDirectory = "c:\\"; process.StartInfo.FileName = "c:\\WINDOWS\\system32\\osk.exe"; //process.StartInfo.Verb = "runas"; process.Start(); }
System.Diagnostics.Process.Start("" + System.Environment.SystemDirectory + "/osk.exe"); //OR System.Diagnostics.Process.Start("osk.exe");
關閉螢幕鍵盤(尋找已開啟的軟體並將它關閉)
System.Diagnostics.Process[] MyProcess = System.Diagnostics.Process.GetProcessesByName("osk"); if (MyProcess.Length>0) { MyProcess[0].Kill(); }
2 thoughts on “C# 調用(呼叫/Call) 螢幕鍵盤(軟體螢幕小鍵盤/software keyboard)”
C# PROCESS 尋找/搜尋 正在執行 EXE/程式/軟體
C# X32 呼叫 WINDOWS X64的系統程式方法
01. 將系統X64程式執行檔案複製到跟X32應用軟體目錄下
02. 透過CMD(BAT) 直接執行 並關閉CMD畫面
Process.Start(@"c:\Windows\Sysnative\cmd.exe","/c start osk.exe exit");