Forum Discussion
Pixel-Ink
Jun 20, 2023Copper Contributor
SendKeys on the WinKeys button
I have looked at MS's list of available send keys on their site, but they don't seem to have one listed for the actual Windows Key. The only solution I found was.... SendKey.Send("^{ESC}") H...
Pixel-Ink
Jun 25, 2023Copper Contributor
Okay, No errors, but nothing else happens.
LucasAndradeNet
Jun 26, 2023Copper Contributor
Pixel-Ink Try again with this code man
using System;
using System.Diagnostics;
class Program
{
static void Main(string[] args)
{
Process.Start("cmd", "/c rundll32.exe user32.dll,LockWorkStation");
Console.WriteLine("Press Enter to exit.");
Console.ReadLine();
}
}
This command is responsible for minimizing all open windows in the Windows operating system and showing the desktop.
When you run this code, the command will be called, and the action will be performed, simulating the press of the Windows + D key combination.
- Pixel-InkJun 26, 2023Copper ContributorThanks, I already can do it this way.