Dim bCanLink

Sub Window_OnInit()
	bCanLink = false
End Sub

Sub Window_OnSize(cx,cy)
End Sub

Sub CheckBox_Link_OnClick(bChecked)
	If bChecked = 1 Then
		bCanLink = true
	Else
		bCanLink = false
	End If
End Sub

' EQ1
Sub SliderBar_EQ1_OnPosChanged(nPos)
	Window.Perform 1011,SliderBar_EQ1.pos
	
	If bCanLink = true Then	
		SliderBar_EQ2.pos = Int((SliderBar_EQ1.pos + SliderBar_EQ3.pos) \ 2)
		Window.Perform 1012,SliderBar_EQ2.pos
	End If
	
End Sub

Sub SliderBar_EQ1_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ2.pos = Int((SliderBar_EQ1.pos + SliderBar_EQ3.pos) \ 2)
	End If
	
End Sub


'EQ2
Sub SliderBar_EQ2_OnPosChanged(nPos)
	Window.Perform 1012,SliderBar_EQ2.pos
	
	If bCanLink = true Then	
		SliderBar_EQ1.pos = SliderBar_EQ2.pos
		Window.Perform 1011,SliderBar_EQ1.pos	
		SliderBar_EQ3.pos = Int((SliderBar_EQ2.pos + SliderBar_EQ4.pos) \ 2)
		Window.Perform 1013,SliderBar_EQ2.pos	
	End If
	
End Sub

Sub SliderBar_EQ2_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ1.pos = SliderBar_EQ2.pos
		SliderBar_EQ3.pos = Int((SliderBar_EQ2.pos + SliderBar_EQ4.pos) \ 2)
	End If
	
End Sub


'EQ3
Sub SliderBar_EQ3_OnPosChanged(nPos)
	Window.Perform 1013,SliderBar_EQ3.pos
	
	If bCanLink = true Then	
		SliderBar_EQ2.pos = Int((SliderBar_EQ1.pos + SliderBar_EQ3.pos) \ 2)
		Window.Perform 1012,SliderBar_EQ2.pos	
		SliderBar_EQ4.pos = Int((SliderBar_EQ3.pos + SliderBar_EQ5.pos) \ 2)
		Window.Perform 1014,SliderBar_EQ4.pos	
	End If
	
End Sub

Sub SliderBar_EQ3_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ2.pos = Int((SliderBar_EQ1.pos + SliderBar_EQ3.pos) \ 2)
		SliderBar_EQ4.pos = Int((SliderBar_EQ3.pos + SliderBar_EQ5.pos) \ 2)
	End If
	
End Sub


'EQ4
Sub SliderBar_EQ4_OnPosChanged(nPos)
	Window.Perform 1014,SliderBar_EQ4.pos
	
	If bCanLink = true Then	
		SliderBar_EQ3.pos = Int((SliderBar_EQ2.pos + SliderBar_EQ4.pos) \ 2)
		Window.Perform 1013,SliderBar_EQ3.pos	
		SliderBar_EQ5.pos = Int((SliderBar_EQ4.pos + SliderBar_EQ6.pos) \ 2)
		Window.Perform 1015,SliderBar_EQ5.pos	
	End If
	
End Sub

Sub SliderBar_EQ4_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ3.pos = Int((SliderBar_EQ2.pos + SliderBar_EQ4.pos) \ 2)
		SliderBar_EQ5.pos = Int((SliderBar_EQ4.pos + SliderBar_EQ6.pos) \ 2)
	End If
	
End Sub


'EQ5
Sub SliderBar_EQ5_OnPosChanged(nPos)
	Window.Perform 1015,SliderBar_EQ5.pos
	
	If bCanLink = true Then	
		SliderBar_EQ4.pos = Int((SliderBar_EQ3.pos + SliderBar_EQ5.pos) \ 2)
		Window.Perform 1014,SliderBar_EQ4.pos	
		SliderBar_EQ6.pos = Int((SliderBar_EQ5.pos + SliderBar_EQ7.pos) \ 2)
		Window.Perform 1016,SliderBar_EQ6.pos	
	End If
	
End Sub

Sub SliderBar_EQ5_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ4.pos = Int((SliderBar_EQ3.pos + SliderBar_EQ5.pos) \ 2)
		SliderBar_EQ6.pos = Int((SliderBar_EQ5.pos + SliderBar_EQ7.pos) \ 2)
	End If
	
End Sub


'EQ6
Sub SliderBar_EQ6_OnPosChanged(nPos)
	Window.Perform 1016,SliderBar_EQ6.pos
	
	If bCanLink = true Then	
		SliderBar_EQ5.pos = Int((SliderBar_EQ4.pos + SliderBar_EQ6.pos) \ 2)
		Window.Perform 1015,SliderBar_EQ5.pos	
		SliderBar_EQ7.pos = Int((SliderBar_EQ6.pos + SliderBar_EQ8.pos) \ 2)
		Window.Perform 1017,SliderBar_EQ7.pos	
	End If
	
End Sub

Sub SliderBar_EQ6_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ5.pos = Int((SliderBar_EQ4.pos + SliderBar_EQ6.pos) \ 2)
		SliderBar_EQ7.pos = Int((SliderBar_EQ6.pos + SliderBar_EQ8.pos) \ 2)
	End If
	
End Sub


'EQ7
Sub SliderBar_EQ7_OnPosChanged(nPos)
	Window.Perform 1017,SliderBar_EQ7.pos
	
	If bCanLink = true Then	
		SliderBar_EQ6.pos = Int((SliderBar_EQ5.pos + SliderBar_EQ7.pos) \ 2)
		Window.Perform 1016,SliderBar_EQ6.pos	
		SliderBar_EQ8.pos = Int((SliderBar_EQ7.pos + SliderBar_EQ9.pos) \ 2)
		Window.Perform 1018,SliderBar_EQ8.pos	
	End If
	
End Sub

Sub SliderBar_EQ7_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ6.pos = Int((SliderBar_EQ5.pos + SliderBar_EQ7.pos) \ 2)
		SliderBar_EQ8.pos = Int((SliderBar_EQ7.pos + SliderBar_EQ9.pos) \ 2)
	End If
	
End Sub


'EQ8
Sub SliderBar_EQ8_OnPosChanged(nPos)
	Window.Perform 1018,SliderBar_EQ8.pos
	
	If bCanLink = true Then	
		SliderBar_EQ7.pos = Int((SliderBar_EQ6.pos + SliderBar_EQ8.pos) \ 2)
		Window.Perform 1017,SliderBar_EQ7.pos	
		SliderBar_EQ9.pos = Int((SliderBar_EQ8.pos + SliderBar_EQ10.pos) \ 2)
		Window.Perform 1019,SliderBar_EQ9.pos	
	End If
	
End Sub

Sub SliderBar_EQ8_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ7.pos = Int((SliderBar_EQ6.pos + SliderBar_EQ8.pos) \ 2)
		SliderBar_EQ9.pos = Int((SliderBar_EQ8.pos + SliderBar_EQ10.pos) \ 2)
	End If
	
End Sub


'EQ9
Sub SliderBar_EQ9_OnPosChanged(nPos)
	Window.Perform 1019,SliderBar_EQ9.pos
	
	If bCanLink = true Then	
		SliderBar_EQ8.pos = Int((SliderBar_EQ7.pos + SliderBar_EQ9.pos) \ 2)
		Window.Perform 1018,SliderBar_EQ8.pos	
		SliderBar_EQ10.pos = SliderBar_EQ9.pos
		Window.Perform 1020,SliderBar_EQ10.pos
	End If
	
End Sub

Sub SliderBar_EQ9_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ8.pos = Int((SliderBar_EQ7.pos + SliderBar_EQ9.pos) \ 2)
		SliderBar_EQ10.pos = SliderBar_EQ9.pos
	End If
	
End Sub


' EQ10
Sub SliderBar_EQ10_OnPosChanged(nPos)
	Window.Perform 1020,SliderBar_EQ10.pos
	
	If bCanLink = true Then	
		SliderBar_EQ9.pos = Int((SliderBar_EQ8.pos + SliderBar_EQ10.pos) \ 2)
		Window.Perform 1019,SliderBar_EQ9.pos
	End If
	
End Sub

Sub SliderBar_EQ10_OnPosChanging(nPos)

	If bCanLink = true Then	
		SliderBar_EQ9.pos = Int((SliderBar_EQ8.pos + SliderBar_EQ10.pos) \ 2)
	End If
	
End Sub


'处理QQMusic程序发来的事件
Sub Window_OnNotify(code,var)
End Sub
