> I'm assuming this is handled in your KeyPress event handler. Your solution
> should work fine as long as you are testing for both enter or return.
>
> e.SuppressKeyPress = (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return);
> > I'm assuming this is handled in your KeyPress event handler. Your solution
> > should work fine as long as you are testing for both enter or return.
[quoted text clipped - 3 lines]
> Excellent! it worked. Didnt know I had to trap them both. Thanks for
> the help!
I just found out that this doesnt work if I call a blocking messagebox
inside the method. Any quickfix for this? What happens is that the
moment I click "OK" on the messagebox the newline appear even though I
did suppresskeypress.
Jared - 25 Aug 2006 12:28 GMT
Can you call your messagebox after you handle the key?
> > > I'm assuming this is handled in your KeyPress event handler. Your solution
> > > should work fine as long as you are testing for both enter or return.
[quoted text clipped - 8 lines]
> moment I click "OK" on the messagebox the newline appear even though I
> did suppresskeypress.