Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent Enter key accept on showdialog called window

Status
Not open for further replies.

Sorwen

Technical User
Nov 30, 2002
1,641
US
I have a form I call with showdialog that has a custom windows control. One of the controls is a TextBox that accepts returns. When I hit enter on the box it closes the dialog window instead. I've tried suppressing it in keydown event on everything but that window and yet it still is a problem. Any ideas?

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
NM. I just found it. Have to set AcceptButton to none.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
You had a VB question. I'm mildly upset I didn't get to answer it.

If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top