Knob Indicator Example for WinForms

Nevron NOV Gauge for WinForms ships with hundreds of examples with full source code, as part of the Nevron Open Vision Suite. All WinForms Gauge examples are also available as a stand-alone Visual Studio solution in C# and VB.NET, which you can download from the links below.

Knob Indicator Example for WinForms Description

The example demonstrates the properties of the knob indicator.


Knob Indicator Example

C# Knob Indicator Example Code for Nevron Gauge for WinForms
Language: C#

using Nevron.Nov;
using Nevron.Nov.Chart;
using Nevron.Nov.Dom;
using Nevron.Nov.Graphics;
using Nevron.Nov.Layout;
using Nevron.Nov.UI;
using Nevron.Nov.Windows.Forms;
using System.Windows.Forms;

namespace NovWinFormsProject
{
	public partial class Form1 : Form
	{
		#region Constructors

		public Form1()
		{
			InitializeComponent();

			// Set form title
			Text = "NOV WinForms - NKnobIndicatorExample";

			// Create the NOV example and its controls
			NWidget exampleContent = CreateExampleContent();
			NWidget exampleControls = CreateExampleControls();
			if (exampleControls != null)
			{
				exampleControls.PreferredWidth = 300;
			}

			// Place the example and its controls in a pair box
			NPairBox pairBox = new NPairBox(exampleContent, exampleControls);
			pairBox.FillMode = ENStackFillMode.First;
			pairBox.FitMode = ENStackFitMode.First;
			pairBox.Margins = new NMargins(NDesign.HorizontalSpacing, NDesign.VerticalSpacing);

			// Host the example in the form
			NNovWidgetHost host = new NNovWidgetHost(pairBox);
			host.Dock = DockStyle.Fill;
			Controls.Add(host);
		}

		#endregion

        #region Example

        public NWidget CreateExampleContent()
		{
			NStackPanel stack = new NStackPanel();
			stack.HorizontalPlacement = ENHorizontalPlacement.Left;

			NStackPanel controlStack = new NStackPanel();
			stack.Add(controlStack);

			// create the radial gauge
			m_RadialGauge = new NRadialGauge();

			//			radialGauge.PreferredSize = new NSize(0, 50);
			//			radialGauge.ContentAlignment = ContentAlignment.MiddleCenter;
			m_RadialGauge.SweepAngle = new NAngle(270, NUnit.Degree);
			m_RadialGauge.BeginAngle = new NAngle(-225, NUnit.Degree);
			m_RadialGauge.NeedleCap.Visible = false;
			m_RadialGauge.PreferredSize = defaultRadialGaugeSize;

			// configure scale
			NGaugeAxis axis = new NGaugeAxis();
			m_RadialGauge.Axes.Add(axis);

			NStandardScale scale = (NStandardScale)axis.Scale;

			scale.SetPredefinedScale(ENPredefinedScaleStyle.PresentationNoStroke);
			scale.Labels.Style.TextStyle.Font = new NFont("Arimo", 12.0, ENFontStyle.Italic);
			scale.Labels.Style.TextStyle.Fill = new NColorFill(NColor.Black);
			scale.Labels.Style.Angle = new NScaleLabelAngle(ENScaleLabelAngleMode.Scale, 0.0);
			scale.MinorTickCount = 4;
			scale.Ruler.Stroke.Width = 0;
			scale.Ruler.Fill = new NColorFill(NColor.DarkGray);

			// create the knob indicator
			m_KnobIndicator = new NKnobIndicator();
			m_KnobIndicator.OffsetFromScale = -3;
			m_KnobIndicator.AllowDragging = true;

            // apply fill style to the marker
            NAdvancedGradientFill advancedGradientFill = new NAdvancedGradientFill();
			advancedGradientFill.BackgroundColor = NColor.Red;
			advancedGradientFill.Points.Add(new NAdvancedGradientPoint(NColor.White, new NAngle(20, NUnit.Degree), 20, 0, 100, ENAdvancedGradientPointShape.Circle));
			m_KnobIndicator.Fill = advancedGradientFill;
			m_KnobIndicator.ValueChanged += OnKnobValueChanged;
			m_RadialGauge.Indicators.Add(m_KnobIndicator);

			// create the numeric display
			m_NumericDisplay = new NNumericLedDisplay();

			m_NumericDisplay.PreferredSize = new NSize(0, 60);
			m_NumericDisplay.BackgroundFill = new NColorFill(NColor.Black);
			m_NumericDisplay.Border = NBorder.CreateSunken3DBorder(new NUIThemeColorMap(ENUIThemeScheme.WindowsClassic));
			m_NumericDisplay.BorderThickness = new NMargins(6);
			m_NumericDisplay.ContentAlignment = ENContentAlignment.MiddleCenter;
			m_NumericDisplay.Margins = new NMargins(5);
			m_NumericDisplay.Padding = new NMargins(5);
			m_NumericDisplay.CapEffect = new NGelCapEffect();

			controlStack.Add(m_RadialGauge);
			controlStack.Add(m_NumericDisplay);

			return stack;
		}

        public NWidget CreateExampleControls()
        {
			NStackPanel stack = new NStackPanel();

			NStackPanel propertyStack = new NStackPanel();
			stack.Add(new NUniSizeBoxGroup(propertyStack));

			// marker properties
			NGroupBox markerGroupBox = new NGroupBox("Marker");
			propertyStack.Add(markerGroupBox);
			NStackPanel markerGroupBoxContent = new NStackPanel();
			markerGroupBox.Content = new NUniSizeBoxGroup(markerGroupBoxContent);

			// fill the marker shape combo
			m_MarkerShapeComboBox = new NComboBox();
			m_MarkerShapeComboBox.Items.FillFromEnum();
			m_MarkerShapeComboBox.SelectedIndex = (int)m_KnobIndicator.Shape;
			m_MarkerShapeComboBox.SelectedIndexChanged += OnKnobAppearanceChanged;
			markerGroupBoxContent.Add(new NPairBox("Shape:", m_MarkerShapeComboBox, true));

			m_MarkerOffsetUpDown = new NNumericUpDown();
			m_MarkerOffsetUpDown.Value = m_KnobIndicator.OffsetFromScale;
			m_MarkerOffsetUpDown.ValueChanged += OnKnobAppearanceChanged;
			markerGroupBoxContent.Add(new NPairBox("Offset:", m_MarkerOffsetUpDown, true));
			
			m_MarkerPaintOrderComboBox = new NComboBox();
			m_MarkerPaintOrderComboBox.Items.FillFromEnum();
			m_MarkerPaintOrderComboBox.SelectedIndex = (int)m_KnobIndicator.MarkerPaintOrder;
			m_MarkerPaintOrderComboBox.SelectedIndexChanged += OnKnobAppearanceChanged;
			markerGroupBoxContent.Add(new NPairBox("Paint Order:", m_MarkerPaintOrderComboBox, true));

			// outer rim properties
			NGroupBox outerRimGroupBox = new NGroupBox("Outer Rim");
			propertyStack.Add(outerRimGroupBox);
			NStackPanel outerRimGroupBoxContent = new NStackPanel();
			outerRimGroupBox.Content = new NUniSizeBoxGroup(outerRimGroupBoxContent);

			m_OuterRimPatternComboBox = new NComboBox();
			m_OuterRimPatternComboBox.Items.FillFromEnum();
			m_OuterRimPatternComboBox.SelectedIndex = (int)m_KnobIndicator.OuterRim.Pattern;
			m_OuterRimPatternComboBox.SelectedIndexChanged += OnKnobAppearanceChanged;
			outerRimGroupBoxContent.Add(new NPairBox("Pattern", m_OuterRimPatternComboBox, true));

			m_OuterRimPatternRepeatCountUpDown = new NNumericUpDown();
			m_OuterRimPatternRepeatCountUpDown.Value = m_KnobIndicator.OuterRim.PatternRepeatCount;
			m_OuterRimPatternRepeatCountUpDown.ValueChanged += OnKnobAppearanceChanged;
			outerRimGroupBoxContent.Add(new NPairBox("Repeat Count:", m_OuterRimPatternRepeatCountUpDown, true));

			m_OuterRimRadiusOffsetUpDown = new NNumericUpDown();
			m_OuterRimRadiusOffsetUpDown.Value = m_KnobIndicator.OuterRim.Offset;
			m_OuterRimRadiusOffsetUpDown.ValueChanged += OnKnobAppearanceChanged;
			outerRimGroupBoxContent.Add(new NPairBox("Radius Offset:", m_OuterRimRadiusOffsetUpDown, true));

			// inner rim properties
			NGroupBox innerRimGroupBox = new NGroupBox("Inner Rim");
			propertyStack.Add(innerRimGroupBox);
			NStackPanel innerRimGroupBoxContent = new NStackPanel();
			innerRimGroupBox.Content = new NUniSizeBoxGroup(innerRimGroupBoxContent);

			m_InnerRimPatternComboBox = new NComboBox();
			m_InnerRimPatternComboBox.Items.FillFromEnum();
			m_InnerRimPatternComboBox.SelectedIndex = (int)m_KnobIndicator.InnerRim.Pattern;
			m_InnerRimPatternComboBox.SelectedIndexChanged += OnKnobAppearanceChanged;
			innerRimGroupBoxContent.Add(new NPairBox("Pattern", m_InnerRimPatternComboBox, true));

			m_InnerRimPatternRepeatCountUpDown = new NNumericUpDown();
			m_InnerRimPatternRepeatCountUpDown.Value = m_KnobIndicator.InnerRim.PatternRepeatCount;
			m_InnerRimPatternRepeatCountUpDown.ValueChanged += OnKnobAppearanceChanged;
			innerRimGroupBoxContent.Add(new NPairBox("Repeat Count:", m_InnerRimPatternRepeatCountUpDown, true));

			m_InnerRimRadiusOffsetUpDown = new NNumericUpDown();
			m_InnerRimRadiusOffsetUpDown.Value = m_KnobIndicator.InnerRim.Offset;
			m_InnerRimRadiusOffsetUpDown.ValueChanged += OnKnobAppearanceChanged;
			innerRimGroupBoxContent.Add(new NPairBox("Radius Offset:", m_InnerRimRadiusOffsetUpDown, true));

            return stack;
        }

		public string GetExampleDescription()
		{
			return @"

The example demonstrates the properties of the knob indicator.

"; } /// /// Gets the relevant documentation links for the example /// /// public (string Name, string Url)[] GetDocumentationUrls() { return new[] { ("Gauges Knob Indicator", "https://www.nevron.com/docs/openvision/gauges-knob-indicator.html"), ("Gauges Indicators Overview", "https://www.nevron.com/docs/openvision/gauges-indicators-overview.html"), }; } #endregion #region Implementation #endregion #region Event Handlers void OnKnobValueChanged(NValueChangeEventArgs arg) { if (m_RadialGauge == null) return; m_NumericDisplay.Value = ((NIndicator)m_RadialGauge.Indicators[0]).Value; } void OnKnobAppearanceChanged(NValueChangeEventArgs arg) { // update the knob marker shape m_KnobIndicator.Shape = (ENScaleValueMarkerShape)m_MarkerShapeComboBox.SelectedIndex; m_KnobIndicator.OffsetFromScale = m_MarkerOffsetUpDown.Value; m_KnobIndicator.MarkerPaintOrder = (ENKnobMarkerPaintOrder)m_MarkerPaintOrderComboBox.SelectedIndex; // update the outer rim style m_KnobIndicator.OuterRim.Pattern = (ENCircularRimPattern)m_OuterRimPatternComboBox.SelectedIndex; m_KnobIndicator.OuterRim.PatternRepeatCount = (int)m_OuterRimPatternRepeatCountUpDown.Value; m_KnobIndicator.OuterRim.Offset = m_OuterRimRadiusOffsetUpDown.Value; // update the inner rim style m_KnobIndicator.InnerRim.Pattern = (ENCircularRimPattern)m_InnerRimPatternComboBox.SelectedIndex; m_KnobIndicator.InnerRim.PatternRepeatCount = (int)m_InnerRimPatternRepeatCountUpDown.Value; m_KnobIndicator.InnerRim.Offset = m_InnerRimRadiusOffsetUpDown.Value; } #endregion #region Fields NRadialGauge m_RadialGauge; NNumericLedDisplay m_NumericDisplay; NKnobIndicator m_KnobIndicator; NNumericUpDown m_MarkerOffsetUpDown; NComboBox m_MarkerPaintOrderComboBox; NComboBox m_MarkerShapeComboBox; NComboBox m_OuterRimPatternComboBox; NNumericUpDown m_OuterRimPatternRepeatCountUpDown; NNumericUpDown m_OuterRimRadiusOffsetUpDown; NNumericUpDown m_InnerRimRadiusOffsetUpDown; NNumericUpDown m_InnerRimPatternRepeatCountUpDown; NComboBox m_InnerRimPatternComboBox; #endregion #region Static Methods #endregion #region Constants private static readonly NSize defaultRadialGaugeSize = new NSize(300, 300); #endregion #region Nested Types #endregion } }

Download a fully functional C# (.cs) Knob Indicator Example for WinForms Solution

VB.NET Knob Indicator Example Code for Nevron Gauge for WinForms
Language: VB.NET

Imports Nevron.Nov
Imports Nevron.Nov.Chart
Imports Nevron.Nov.Dom
Imports Nevron.Nov.Graphics
Imports Nevron.Nov.Layout
Imports Nevron.Nov.UI
Imports Nevron.Nov.Windows.Forms

Public Class Form1

#Region "Constructors"

    Public Sub New()
        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

        ' Set form title
        Text = "NOV WinForms - NKnobIndicatorExample"

        ' Create the NOV example and its controls
        Dim exampleContent As NWidget = CreateExampleContent()
        Dim exampleControls As NWidget = CreateExampleControls()
        If Not exampleControls Is Nothing Then
            exampleControls.PreferredWidth = 300
        End If

        ' Place the example and its controls in a pair box
        Dim pairBox As NPairBox = New NPairBox(exampleContent, exampleControls)
        pairBox.FillMode = ENStackFillMode.First
        pairBox.FitMode = ENStackFitMode.First
        pairBox.Margins = New NMargins(NDesign.HorizontalSpacing, NDesign.VerticalSpacing)

        ' Host the example in the form
        Dim host As NNovWidgetHost(Of NWidget) = New NNovWidgetHost(Of NWidget)(pairBox)
        host.Dock = DockStyle.Fill
        Controls.Add(host)
    End Sub


#End Region

#Region "Example"

        Public Function CreateExampleContent() As NWidget
            Dim stack As NStackPanel = New NStackPanel()
            stack.HorizontalPlacement = ENHorizontalPlacement.Left

            Dim controlStack As NStackPanel = New NStackPanel()
            stack.Add(controlStack)

            ' create the radial gauge
            m_RadialGauge = New NRadialGauge()

            '			radialGauge.PreferredSize = new NSize(0, 50);
            '			radialGauge.ContentAlignment = ContentAlignment.MiddleCenter;
            m_RadialGauge.SweepAngle = New NAngle(270, NUnit.Degree)
            m_RadialGauge.BeginAngle = New NAngle(-225, NUnit.Degree)
            m_RadialGauge.NeedleCap.Visible = False
            m_RadialGauge.PreferredSize = defaultRadialGaugeSize

            ' configure scale
            Dim axis As NGaugeAxis = New NGaugeAxis()
            m_RadialGauge.Axes.Add(axis)

            Dim scale = CType(axis.Scale, NStandardScale)

            scale.SetPredefinedScale(ENPredefinedScaleStyle.PresentationNoStroke)
            scale.Labels.Style.TextStyle.Font = New NFont("Arimo", 12.0, ENFontStyle.Italic)
            scale.Labels.Style.TextStyle.Fill = New NColorFill(NColor.Black)
            scale.Labels.Style.Angle = New NScaleLabelAngle(ENScaleLabelAngleMode.Scale, 0.0)
            scale.MinorTickCount = 4
            scale.Ruler.Stroke.Width = 0
            scale.Ruler.Fill = New NColorFill(NColor.DarkGray)

            ' create the knob indicator
            m_KnobIndicator = New NKnobIndicator()
            m_KnobIndicator.OffsetFromScale = -3
            m_KnobIndicator.AllowDragging = True

            ' apply fill style to the marker
            Dim advancedGradientFill As NAdvancedGradientFill = New NAdvancedGradientFill()
            advancedGradientFill.BackgroundColor = NColor.Red
            advancedGradientFill.Points.Add(New NAdvancedGradientPoint(NColor.White, New NAngle(20, NUnit.Degree), 20, 0, 100, ENAdvancedGradientPointShape.Circle))
            m_KnobIndicator.Fill = advancedGradientFill
            Me.m_KnobIndicator.ValueChanged += AddressOf OnKnobValueChanged
            m_RadialGauge.Indicators.Add(m_KnobIndicator)

            ' create the numeric display
            m_NumericDisplay = New NNumericLedDisplay()

            m_NumericDisplay.PreferredSize = New NSize(0, 60)
            m_NumericDisplay.BackgroundFill = New NColorFill(NColor.Black)
            m_NumericDisplay.Border = NBorder.CreateSunken3DBorder(New NUIThemeColorMap(ENUIThemeScheme.WindowsClassic))
            m_NumericDisplay.BorderThickness = New NMargins(6)
            m_NumericDisplay.ContentAlignment = ENContentAlignment.MiddleCenter
            m_NumericDisplay.Margins = New NMargins(5)
            m_NumericDisplay.Padding = New NMargins(5)
            m_NumericDisplay.CapEffect = New NGelCapEffect()

            controlStack.Add(m_RadialGauge)
            controlStack.Add(m_NumericDisplay)

            Return stack
        End Function

        Public Function CreateExampleControls() As NWidget
            Dim stack As NStackPanel = New NStackPanel()

            Dim propertyStack As NStackPanel = New NStackPanel()
            stack.Add(New NUniSizeBoxGroup(propertyStack))

            ' marker properties
            Dim markerGroupBox As NGroupBox = New NGroupBox("Marker")
            propertyStack.Add(markerGroupBox)
            Dim markerGroupBoxContent As NStackPanel = New NStackPanel()
            markerGroupBox.Content = New NUniSizeBoxGroup(markerGroupBoxContent)

            ' fill the marker shape combo
            m_MarkerShapeComboBox = New NComboBox()
            m_MarkerShapeComboBox.Items.FillFromEnum(Of ENScaleValueMarkerShape)()
            m_MarkerShapeComboBox.SelectedIndex = m_KnobIndicator.Shape
            Me.m_MarkerShapeComboBox.SelectedIndexChanged += AddressOf OnKnobAppearanceChanged
            markerGroupBoxContent.Add(New NPairBox("Shape:", m_MarkerShapeComboBox, True))

            m_MarkerOffsetUpDown = New NNumericUpDown()
            m_MarkerOffsetUpDown.Value = m_KnobIndicator.OffsetFromScale
            Me.m_MarkerOffsetUpDown.ValueChanged += AddressOf OnKnobAppearanceChanged
            markerGroupBoxContent.Add(New NPairBox("Offset:", m_MarkerOffsetUpDown, True))

            m_MarkerPaintOrderComboBox = New NComboBox()
            m_MarkerPaintOrderComboBox.Items.FillFromEnum(Of ENKnobMarkerPaintOrder)()
            m_MarkerPaintOrderComboBox.SelectedIndex = m_KnobIndicator.MarkerPaintOrder
            Me.m_MarkerPaintOrderComboBox.SelectedIndexChanged += AddressOf OnKnobAppearanceChanged
            markerGroupBoxContent.Add(New NPairBox("Paint Order:", m_MarkerPaintOrderComboBox, True))

            ' outer rim properties
            Dim outerRimGroupBox As NGroupBox = New NGroupBox("Outer Rim")
            propertyStack.Add(outerRimGroupBox)
            Dim outerRimGroupBoxContent As NStackPanel = New NStackPanel()
            outerRimGroupBox.Content = New NUniSizeBoxGroup(outerRimGroupBoxContent)

            m_OuterRimPatternComboBox = New NComboBox()
            m_OuterRimPatternComboBox.Items.FillFromEnum(Of ENCircularRimPattern)()
            m_OuterRimPatternComboBox.SelectedIndex = m_KnobIndicator.OuterRim.Pattern
            Me.m_OuterRimPatternComboBox.SelectedIndexChanged += AddressOf OnKnobAppearanceChanged
            outerRimGroupBoxContent.Add(New NPairBox("Pattern", m_OuterRimPatternComboBox, True))

            m_OuterRimPatternRepeatCountUpDown = New NNumericUpDown()
            m_OuterRimPatternRepeatCountUpDown.Value = m_KnobIndicator.OuterRim.PatternRepeatCount
            Me.m_OuterRimPatternRepeatCountUpDown.ValueChanged += AddressOf OnKnobAppearanceChanged
            outerRimGroupBoxContent.Add(New NPairBox("Repeat Count:", m_OuterRimPatternRepeatCountUpDown, True))

            m_OuterRimRadiusOffsetUpDown = New NNumericUpDown()
            m_OuterRimRadiusOffsetUpDown.Value = m_KnobIndicator.OuterRim.Offset
            Me.m_OuterRimRadiusOffsetUpDown.ValueChanged += AddressOf OnKnobAppearanceChanged
            outerRimGroupBoxContent.Add(New NPairBox("Radius Offset:", m_OuterRimRadiusOffsetUpDown, True))

            ' inner rim properties
            Dim innerRimGroupBox As NGroupBox = New NGroupBox("Inner Rim")
            propertyStack.Add(innerRimGroupBox)
            Dim innerRimGroupBoxContent As NStackPanel = New NStackPanel()
            innerRimGroupBox.Content = New NUniSizeBoxGroup(innerRimGroupBoxContent)

            m_InnerRimPatternComboBox = New NComboBox()
            m_InnerRimPatternComboBox.Items.FillFromEnum(Of ENCircularRimPattern)()
            m_InnerRimPatternComboBox.SelectedIndex = m_KnobIndicator.InnerRim.Pattern
            Me.m_InnerRimPatternComboBox.SelectedIndexChanged += AddressOf OnKnobAppearanceChanged
            innerRimGroupBoxContent.Add(New NPairBox("Pattern", m_InnerRimPatternComboBox, True))

            m_InnerRimPatternRepeatCountUpDown = New NNumericUpDown()
            m_InnerRimPatternRepeatCountUpDown.Value = m_KnobIndicator.InnerRim.PatternRepeatCount
            Me.m_InnerRimPatternRepeatCountUpDown.ValueChanged += AddressOf OnKnobAppearanceChanged
            innerRimGroupBoxContent.Add(New NPairBox("Repeat Count:", m_InnerRimPatternRepeatCountUpDown, True))

            m_InnerRimRadiusOffsetUpDown = New NNumericUpDown()
            m_InnerRimRadiusOffsetUpDown.Value = m_KnobIndicator.InnerRim.Offset
            Me.m_InnerRimRadiusOffsetUpDown.ValueChanged += AddressOf OnKnobAppearanceChanged
            innerRimGroupBoxContent.Add(New NPairBox("Radius Offset:", m_InnerRimRadiusOffsetUpDown, True))

            Return stack
        End Function

        Public Function GetExampleDescription() As String
            Return "

The example demonstrates the properties of the knob indicator.

" End Function ''' ''' Gets the relevant documentation links for the example ''' ''' Public Function GetDocumentationUrls() As (String, String)() Return {("Gauges Knob Indicator", "https://www.nevron.com/docs/openvision/gauges-knob-indicator.html"), ("Gauges Indicators Overview", "https://www.nevron.com/docs/openvision/gauges-indicators-overview.html")} End Function #End Region #Region "Implementation" #End Region #Region "Event Handlers" Private Sub OnKnobValueChanged(arg As NValueChangeEventArgs) If m_RadialGauge Is Nothing Then Return m_NumericDisplay.Value = m_RadialGauge.Indicators(0).Value End Sub Private Sub OnKnobAppearanceChanged(arg As NValueChangeEventArgs) ' update the knob marker shape m_KnobIndicator.Shape = CType(m_MarkerShapeComboBox.SelectedIndex, ENScaleValueMarkerShape) m_KnobIndicator.OffsetFromScale = m_MarkerOffsetUpDown.Value m_KnobIndicator.MarkerPaintOrder = CType(m_MarkerPaintOrderComboBox.SelectedIndex, ENKnobMarkerPaintOrder) ' update the outer rim style m_KnobIndicator.OuterRim.Pattern = CType(m_OuterRimPatternComboBox.SelectedIndex, ENCircularRimPattern) m_KnobIndicator.OuterRim.PatternRepeatCount = CInt(m_OuterRimPatternRepeatCountUpDown.Value) m_KnobIndicator.OuterRim.Offset = m_OuterRimRadiusOffsetUpDown.Value ' update the inner rim style m_KnobIndicator.InnerRim.Pattern = CType(m_InnerRimPatternComboBox.SelectedIndex, ENCircularRimPattern) m_KnobIndicator.InnerRim.PatternRepeatCount = CInt(m_InnerRimPatternRepeatCountUpDown.Value) m_KnobIndicator.InnerRim.Offset = m_InnerRimRadiusOffsetUpDown.Value End Sub #End Region #Region "Fields" Private m_RadialGauge As NRadialGauge Private m_NumericDisplay As NNumericLedDisplay Private m_KnobIndicator As NKnobIndicator Private m_MarkerOffsetUpDown As NNumericUpDown Private m_MarkerPaintOrderComboBox As NComboBox Private m_MarkerShapeComboBox As NComboBox Private m_OuterRimPatternComboBox As NComboBox Private m_OuterRimPatternRepeatCountUpDown As NNumericUpDown Private m_OuterRimRadiusOffsetUpDown As NNumericUpDown Private m_InnerRimRadiusOffsetUpDown As NNumericUpDown Private m_InnerRimPatternRepeatCountUpDown As NNumericUpDown Private m_InnerRimPatternComboBox As NComboBox #End Region #Region "Static Methods" #End Region #Region "Constants" Private Shared ReadOnly defaultRadialGaugeSize As NSize = New NSize(300, 300) #End Region #Region "Nested Types" #End Region End Class

Download a fully functional VB.NET (.vb) Knob Indicator Example for WinForms Solution