If you want to enable virtual keyboard in our application,
first we have to add a namespace
“using System.Diagnostics;”
private void
btnvirtual_Click(object sender, EventArgs e)
{
txtUserName.Focus(); //To place the
cursor in textbox
Process prc =
Process.Start("OSK.exe");
}
To
Kill the Process without using window close button:
foreach (Process p in Process.GetProcessesByName
("Process Name"))
{
if
(p.ProcessName.StartsWith("ProcessName"))
p.Kill();
}
No comments:
Post a Comment