Quick example. This is in a media player where the Trackbar must be moved to match the position of the song. The event handler has to be disabled because it would fire upon setting the position, causing a very undesirable situation in the program.
Code:
TrackBar1.OnChange := nil;
Trackbar1.Position := MediaPlayer1.Position;
TrackBar1.OnChange := TrackBar1Change; //(name of the handler within the form)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.