View Single Post
  #3 (permalink)  
Old 03-11-2008, 12:06 PM
cpc6128 cpc6128 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 17
Default

kolbe,

one way of solving your problem would be to declare a global variable that your trackbar ValueChanged sub can use to differentiate a change made within the program from a change made by user input. In this example, the code in bar_ValueChanged only executes if the change DOES NOT come from Timer1_Tick:

Sub Globals
Dim auto_change
End Sub

Sub Timer1_Tick
auto_change=true
' change bar.value here
auto_change=false
End Sub

Sub bar_ValueChanged
If auto_change=false Then
' change fmod.position here
End If
End Sub
Reply With Quote