Please help! I'm new to vb.net and I am having trouble understanding events or at least getting them to work. I am using a self guided book and they ask you to raise an event to display and messagebox if the user types an 'x' into a text box. I was able to get this to work using keypress without raising an event. When i try to use an event I get error that 'Handles clause requires a WithEvents variable . As I see it TextBox2 is declared "WithEvents" The error is displayed for the TextBox2 portion of the following code which I coded in red below 'TextBox2.KeyPress'
Thanks
<System.Diagnostics.DebuggerStepThrough()>
#
MessageBox.Show(Text)
End
Public