Keyboard Events: Handling DELETE (and other keys) with KeyUp in C#

Опубликовано: 07 Март 2025
на канале: Code With Huw
727
14

How do you handle keystrokes such as Delete or Backspace in your C# applications?

In .NET, you can write event-handlers for various keyboard events such as KeyDown and KeyUp. In this lesson I explain how to respond to the Delete key by removing an item from a listview.

For more C# Programming Projects, see this Playlist:    • C# Programming Projects  

To understand file launching, I’d also recommend that you watch my lessons on programming a Disk Browser – which you can find here:    • How to Program A Disk Browser in C#  

Huw Collingbourne is author of numerous books on programming C, C#, Java, Ruby, Delphi and Object Pascal, pointers, recursion and programming adventure games. Find them all on Amazon.

To learn C# quickly, Huw’s book, available in paperback or for Kindle, is the perfect complement to these YouTube lessons.
The Little Book Of C# Programming (Amazon US): https://amzn.to/2JWDI0o
The Little Book Of C# Programming (Amazon UK): https://amzn.to/2YaCPtS

Keep in Touch
==============================
Subscribe to the Code With Huw YouTube channel: https://www.youtube.com/CodeWithHuw?s...

Code With Huw on Facebook:
  / codewithhuw