tags:

views:

35

answers:

1

My form has several textboxes and several buttons. The textboxes are loaded with data by the load event. If I make changes to the textboxes and then move the cursor over a button, the textboxes are suddenly loaded again with the original information. I don't click a button. I just move the mouse over one. Why is this happening and how do I stop it?

+2  A: 

This cannot happen by itself. I suggest you check all event-settings.

For instance, you could have, by accident, linked the Load event to the Button's OnMouseEnter or something like that.


After your comment:

You should absolutely not use the paint event to initialize things. The paint event will be called after every change in the Form.

So move that code to the Load event.

Henk Holterman
Yep, that was it. Thanks!