Click event handler in forms, which the forms are in the mdi container

  • Thread starter Arashk Mahjoubi Amine
  • Start date
A

Arashk Mahjoubi Amine

Hi
I have question about Click event handler in forms, which the forms are
in the mdi container.
Let say from1 is a mdi container (IsMDIContainer = True) and include
form2 and form3.
In form3 we have a Textbox and Button and both of them have Click event
handler and also AcceptButton in from3 is false.
Now after you ran this project, if you go on textbox and hit the "enter"
key, you will see that the button click event will get fire!!!???
Please let me know, if you have any suggestion. ([email protected])
Thanks
-Ash
Note:
You find an example about this issue in this address:

http://www.caip.rutgers.edu/~arashk/VB.net/example/ButtonClickOnTextBoxE
nterKeyPress.zip

Run the project.
1-Go to form2 and click, then press the enter key.
2- Go to Textbox in form3 and click (so the focus is on text box). Now
press the Enter key on text box.
As you can see instead of Textbox1 key press event, the Button1 key
press event will get fire!!!!!!
 
G

Guest

Hi,

If the form contain only one button, by default there is a property in a form called "Accept Button", if you give the name of the button to that property, While you hit the enter key in the form , then this event will be fired.
let me know if any problem.

Bindukaladeepan.C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top