A, you need to use a global variable e.g Public Shared Variable name as string... B, Create a new event handler for key-press event of the textbox, and u would need to use e.handled.