views:

196

answers:

2

Well my problem is this: I set the AcceptButton on a form and this gives me the nice effect that it triggers the buttons Click event, but if I'm on a MultiLine textbox I don't want this to happen. Then I just want it to put a enter in it.

Is there any way to do this?

+8  A: 

Set "AcceptsReturn" property of the textbox to true.

Peter
+3  A: 

There is a property on the Texbox control:

textbox1.AcceptsReturn = true;
Julien Poulin