Slider.Value how to set value with calling ValueChange

It seems in the releases 2025 setting a slider.value triggers a ValueChange event. If I am opening the screen to set slidervalue I can’t set the value without ValueChange event being triggered?
Previous releases did not have this issue.

Am I missing something?

For situations like this, I add a boolean to the window, codeSetting = false.
Then when I have code that sets an initial value, I have code like:

codeSetting = True
mySlider.value = 5
codeSetting = False

in the slider’s ValueChange event, I have:

If codeSetting then
   return// exits the Value Changed event
End If

Thanks Mark. In your example codeSetting is Property of the specific screen or global?
Did you ru not issues with 2025 version?
Thanks Again!

I make it global for the window it’s on, so if I have multiple documents open, it doesn’t affect others, and I can use it for anywhere I set something in code that can trigger an event - i.e. the TextChanged event of a TextArea, etc.

I usually subclass the control and add a method called something like SetValueWithoutEvent that does all that hopscotch to avoid firing the event. It involves adding a private Boolean property, implementing the ValueChanged event, creating a new ValueChanged event and then checking the value of the property before raising the event:

Class MySlider
Private Property suppressEvent as Boolean

Event Definition ValueChanged

Event Handler ValueChanged
If not suppressEvent then
RaiseEvent ValueChanged
End if

Sub SetValueWithoutEvent(value as integer)
SuppressEvent = true
Self.value = value
SuppressEvent = false