Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

This is a continuation for the thread Keypress Anomaly in which I was having a problem with an MDI application and picking up enter on keypress in a text box. I am still having that problem and I have been able to recreate it with a very simple example that I am attaching.

 

Here is a step by step guide to reproduce the problem:

 

1) Run the application.

2) Click the Child1 menu item in the MDI Parent - Notice the textbox has the ReadOnly property set to true.

3) Click Enable - the textbox ReadOnly property is set to false & Message "Allowing enter to be pressed" comes up - click ok.

4) Click in the textbox & press enter - Message "You pressed enter!!" comes up - click ok.

5) Click Disable - the textbox ReadOnly property is set to true.

6) Click the Child2 menu item in the MDI Parent.

7) Click the x to close child 2.

8) (In Child1) click Enable - Message "Allowing enter to be pressed" comes up - click ok (textbox ReadOnly set to false).

9) Click in the textbox & press enter - No message comes up and the textbox becomes readonly. Why?

 

Any help from this will be really appreciated. Thanks in advance.

KeypressAnomoly.zip

Posted
works as expected for me.

Joe Mamma

Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.

Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Posted
You mean that at step #9 when you hit enter it displays the message that enter was pressed?
yepper! it does!

Joe Mamma

Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.

Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Posted
Interesting...can anyone else try this out and see if it works(doesn't work) for you? I just tried again and I still get the same problem. In step 9 I even can type anything I want in the text box but as soon as I hit enter, it changes the readonly property to true and no event for pressing enter is triggered.
  • 3 weeks later...
Posted

Please Help........

 

I can not figure this one out. I can reproduce the same problem every single time. I even re-installed Visual Studio. Has anyone ever had this kind of thing happen to them? How can it work on some machines but not on others? There must be someone else out there who can try this and see if they get the same error. It is causing a ton of problems in the software I have been developing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...