BringBackTheButton - why does the lnkDont_LinkClicked event happen when pressing enter on the form?

Hello SDL Developer Community!

(This is my first post)

My team and I are exploring the "BringBackTheButton" sample plug-in.

We have taken it apart and understand the parts pretty well, but one behaviour has stumped us.

We modified the code of the form as follows:

private void lnkDont_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
var player = new SoundPlayer(PluginResources.holy_alphabet);


When the link "Do not push this button!" is pressed, our wave file (Batman's Robin saying "Holy Alphabet!'") is played instead of the Cuckoo Clock (which still plays on load).

We would have thought pressing the "Enter" key on the form would be the same as hitting the OK button, triggering the message box: "Brought to you by SDL in sympathy...."

What we DON'T understand is why the event for lnkDont_LinkClicked seems to be triggered when you hit the enter key on the form, i.e. the wave file "Holy Alphabet!" now plays when you hit the "Enter" key on the form.

Any explanation would be greatly appreciated.


Tom Fennell

Parents Reply Children
No Data