FancyPrairie
Programmer
I have 36 textboxes on my web form all lined up in a row with each one touching the other. When the user clicks on one of the textboxes, I change its background color to Red and move a panel on top of the textbox (panel has the same dimensions as the textbox). When the user moves the mouse over the right or left edge of the panel I change the cursor to "w-resize". As the user holds the mouse button down he can resize the width of the panel. Each textbox that the panel covers turns red. If the user moves the mouse in the other direction, the background color of the textboxes that are not covered by the panel are changed from red to silver.
This all works fine as long as I don't move the mouse to fast. If I move the mouse too fast, the color of some of the text boxes doesn't get changed to silver. It appears that my code can not keep up with the mouse. However, the code that changes the size of the panel as the mouse moves keeps up as well as a label I drag along with the mouse. It's just the code that changes the background color of the textboxes that can't keep up.
Is there some way that I can ensure that all of the code is executed before the next cycle into the code? Note that I'm doing this via the OnMouseMove event of the document.
This all works fine as long as I don't move the mouse to fast. If I move the mouse too fast, the color of some of the text boxes doesn't get changed to silver. It appears that my code can not keep up with the mouse. However, the code that changes the size of the panel as the mouse moves keeps up as well as a label I drag along with the mouse. It's just the code that changes the background color of the textboxes that can't keep up.
Is there some way that I can ensure that all of the code is executed before the next cycle into the code? Note that I'm doing this via the OnMouseMove event of the document.