MDI RichtextBox problem

G

Guest

Hi all,

I have searched all over the place to solve this one so I am hoping somebody can point me in a direction or give me a solution.

Basicly this is my problem.

I have created a MDI container this I have called MDI
I have created a Form called Form1 and place on it a button called button1 This opens Form2 into the MDI container and richtextBox called richtextBox1.

I then created a second form called Form2 that has nothing in it, Just a plain form.

All this works fine except when I go and press on Button1 and this calls Form2 I close form2 and then go and click on richtextbox1 and put my cursors into the control and type some characters then press enter to give me another line. Instead of giving me a second line it opens Form2. I close form2 and try and repeat this and it all works fine.

It seems it not releasing Focus for "Enter" key enters on the button , Am I doing something really silly ? is there a known solution to this.

Any pointers help would be excellent,

Thank you in advance.

James
 

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