Wrong form event triggerd when using MDI

G

Guest

I have one button and a textbox on a form. When pressing enter-key in the textbox the keydown event is triggered as i should. Then i open another mdi-child (opens from the button_click event) and when I return to the first form and presses the enter-key in the textbox again the Button_Click is trigered instead of the keydown event ?
I feel almost like the AcceptButton property has been set to the button or something like that. However this property i "Nothing" and the textbox still has the focus when checking in the button_click event

I have one very simple example here: http://marvin.irm.se/max/Sample/WindowsApplication8.zip
 
Y

Ying-Shen Yu[MSFT]

Hi,

This is a known issue in VS.NET 2003, our product group had already noticed
this issue and planning to fix it in the next release.
For now, you may try using the following code to see if could workaround
your problem:

class MyTextBox : TextBox
{
protected override bool ProcessDialogKey(Keys keyData)
{
if( keyData == Keys.Enter && this.AcceptsReturn)
{
return false;
}
return base.ProcessDialogKey (keyData);
}
}

Please feel free to reply this thread if you still have problem on this
issue.
Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
G

Guest

Hi Max, Y
I have a similiar kind of proble
I extra worry is that I am using Infragistics controls with Office 2003 look
Now they have told me that it is problem with .Net framework
Can we hope to have a fix release soon ?

----- "Ying-Shen Yu[MSFT]" wrote: ----

Hi

This is a known issue in VS.NET 2003, our product group had already noticed
this issue and planning to fix it in the next release
For now, you may try using the following code to see if could workaround
your problem

class MyTextBox : TextBo

protected override bool ProcessDialogKey(Keys keyData

if( keyData == Keys.Enter && this.AcceptsReturn

return false

return base.ProcessDialogKey (keyData)



Please feel free to reply this thread if you still have problem on this
issue
Thanks


Best regards,

Ying-Shen Yu [MSFT
Microsoft Community Suppor
Get Secure! - www.microsoft.com/securit

This posting is provided "AS IS" with no warranties and confers no rights
This mail should not be replied directly, please remove the word "online"
before sending mail
 
Y

Ying-Shen Yu[MSFT]

Hi,

Unfortunately, I'm not clear when the service pack will be released, if
this is an urgent issue, you may contact our Phone Service to ask for a
hotfix.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 

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