Capturing Keypresses

by Jan 30, 2013

Hi all,

I'm trying to figure out how to do this in PowerShell 2, and I'm running into some walls. My premise is fairly simple:

I have a form with three textboxes (First Name,  Last Name, and Display Name). As I type into First Name or Last Name textboxes, I'd like the Display Name textbox to update on-the-fly. I've looked into using the KeyDown event handler, but am confused on how to use it. I'm open to other ways as well.

I'm trying to mimic the functionality of creating a new user in the Microsoft Active Directory Users & Computers MMC snap-in.

If anyone could provide me a code example of how this would be accomplished, I would be very appreciative!