Hello I am doing a program that will notice when a specific key is pressed and write an specific letter where the person is writing. I had thought of doing it in a Console app or should i do it in an Windows Forms? I don’t either now how to get it to work in the background or how to to write it out where the user do write?
the code i have done until now looks like:
static void Main(string[] args)
{
while (true)
{
ConsoleKeyInfo cki;
cki = Console.ReadKey();
Console.WriteLine(cki.Key.ToString());
if (cki.Key.ToString() == "F" && (cki.Modifiers & ConsoleModifiers.Control) != 0)
{
//typ something where the person is writing
}
}
}
thanks for all help
If you add a reference to
System.Windows.Formsthen you can do this: