Independent slide

I made a custom button, i implemented some "slide function" and it works very good,when the user has the mouse on the control it slides to the right,and reset the default size when the MouseLeave event ocurrs, however, when i put several of the same buttons in a windows form, i put the cursor on top of each one, and they slide right, but they have to wait until the previous button resets it's size, so the slide function is not independent...how can i solve this , is neccesary to use different threads , and if i use threads, they should be declared in the Custom button class or in the windows app that use them

Answer this question

Independent slide

  • Geeee

    All user interface code executes on the thread used to create the control handle. You cannot use another thread to perform operations without getting some undesired behaviour. You may have to create a parent control that deals with a collection of buttons and manages the sliding at a macro level rather than leaving it to the button itself.


  • Independent slide