ArcObjects Library Reference  

DynamicBikingSpeedCtrl

About the Dynamic biking Sample

[C#]

DynamicBikingSpeedCtrl.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace DynamicBiking
{
	public partial class DynamicBikingSpeedCtrl : UserControl
	{
		private DynamicBikingCmd m_dynamicBikingCmd = null;
		
		public DynamicBikingSpeedCtrl()
		{
			InitializeComponent();
		}

		public void SetDynamicBikingCmd(DynamicBikingCmd dynamicBikingCmd)
		{
			m_dynamicBikingCmd = dynamicBikingCmd;
		}

		private void trackBar1_ValueChanged(object sender, EventArgs e)
		{
			if (m_dynamicBikingCmd != null)
			{
				m_dynamicBikingCmd.PlaybackSpeed = trackBar1.Value;
				toolTip1.ToolTipTitle = Convert.ToString(trackBar1.Value);
			}
		}
	}
}

[Visual Basic .NET]

DynamicBikingSpeedCtrl.vb

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Drawing
Imports System.Data
Imports System.Text
Imports System.Windows.Forms

	Public Partial Class DynamicBikingSpeedCtrl : Inherits UserControl
		Private m_dynamicBikingCmd As DynamicBikingCmd = Nothing

		Public Sub New()
			InitializeComponent()
		End Sub

		Public Sub SetDynamicBikingCmd(ByVal dynamicBikingCmd As DynamicBikingCmd)
			m_dynamicBikingCmd = dynamicBikingCmd
		End Sub

		Private Sub trackBar1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles trackBar1.ValueChanged
			If Not m_dynamicBikingCmd Is Nothing Then
				m_dynamicBikingCmd.PlaybackSpeed = trackBar1.Value
				toolTip1.ToolTipTitle = Convert.ToString(trackBar1.Value)
			End If
		End Sub
	End Class