<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FGUI%2FTrackBar</id>
		<title>VB.Net Tutorial/GUI/TrackBar - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FGUI%2FTrackBar"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/TrackBar&amp;action=history"/>
		<updated>2026-04-05T13:06:42Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/TrackBar&amp;diff=3870&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/TrackBar&amp;diff=3870&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/TrackBar&amp;diff=3871&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/TrackBar&amp;diff=3871&amp;oldid=prev"/>
				<updated>2010-05-26T12:57:16Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Get TrackBar value and LargeChange value==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;imports System&lt;br /&gt;
imports System.Drawing&lt;br /&gt;
imports System.Windows.Forms&lt;br /&gt;
public class TrackBars : inherits Form&lt;br /&gt;
  dim htbar as TrackBar&lt;br /&gt;
  dim vtbar as TrackBar&lt;br /&gt;
  public sub New()&lt;br /&gt;
    Size = new Size(500,520)&lt;br /&gt;
    htbar = new TrackBar()&lt;br /&gt;
    htbar.Parent = me&lt;br /&gt;
    htbar.Orientation = Orientation.Horizontal&lt;br /&gt;
    htbar.Size = new Size(200, 10)&lt;br /&gt;
    htbar.Location = new Point(0, 25)&lt;br /&gt;
    htbar.TickStyle = TickStyle.BottomRight&lt;br /&gt;
    htbar.TickFrequency = 25&lt;br /&gt;
    htbar.Minimum = 25&lt;br /&gt;
    htbar.Maximum = 400&lt;br /&gt;
    htbar.SmallChange = 10&lt;br /&gt;
    htbar.LargeChange = 25&lt;br /&gt;
    htbar.BackColor = Color.Yellow&lt;br /&gt;
    htbar.Value = 100&lt;br /&gt;
    AddHandler htbar.ValueChanged, AddressOf htbar_OnValueChanged&lt;br /&gt;
    vtbar = new TrackBar()&lt;br /&gt;
    vtbar.Parent = me&lt;br /&gt;
    vtbar.Orientation = Orientation.Vertical&lt;br /&gt;
    vtbar.Size = new Size(25, 300)&lt;br /&gt;
    vtbar.Location = new Point(25, 25)&lt;br /&gt;
    vtbar.TickStyle = TickStyle.BottomRight&lt;br /&gt;
    vtbar.SetRange(25,400)&lt;br /&gt;
    vtbar.SmallChange = 10&lt;br /&gt;
    vtbar.LargeChange = 50&lt;br /&gt;
    vtbar.TickFrequency = CInt(vtbar.Maximum / 20)&lt;br /&gt;
    vtbar.BackColor = Color.Pink&lt;br /&gt;
    vtbar.Value = 200&lt;br /&gt;
    AddHandler vtbar.ValueChanged, AddressOf vtbar_OnValueChanged&lt;br /&gt;
  end sub  &amp;quot;  close for constructor&lt;br /&gt;
  private sub htbar_OnValueChanged(ByVal sender as object, _&lt;br /&gt;
              ByVal e as EventArgs)&lt;br /&gt;
    Console.WriteLine(htbar.Value)&lt;br /&gt;
  end sub&lt;br /&gt;
  private sub vtbar_OnValueChanged(ByVal sender as object, _&lt;br /&gt;
              ByVal e as EventArgs)&lt;br /&gt;
    Console.WriteLine(vtbar.Value)&lt;br /&gt;
    Console.WriteLine(vtbar.LargeChange)&lt;br /&gt;
  end sub&lt;br /&gt;
  public shared sub Main() &lt;br /&gt;
    Application.Run(new TrackBars())&lt;br /&gt;
  end sub&lt;br /&gt;
end class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Link ProgressBar with a TrackBar==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Windows.Forms&lt;br /&gt;
public class TrackBarProgressBarLink&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll&lt;br /&gt;
        ProgressBar1.Value = TrackBar1.Value&lt;br /&gt;
        Label1.Text = ProgressBar1.Value.ToString + &amp;quot;/100&amp;quot;&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.ProgressBar1 = New System.Windows.Forms.ProgressBar&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.TrackBar1 = New System.Windows.Forms.TrackBar&lt;br /&gt;
        CType(Me.TrackBar1, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ProgressBar1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ProgressBar1.Location = New System.Drawing.Point(12, 50)&lt;br /&gt;
        Me.ProgressBar1.Name = &amp;quot;ProgressBar1&amp;quot;&lt;br /&gt;
        Me.ProgressBar1.Size = New System.Drawing.Size(358, 34)&lt;br /&gt;
        Me.ProgressBar1.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.AutoSize = True&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(160, 23)&lt;br /&gt;
        Me.Label1.Name = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        Me.Label1.Size = New System.Drawing.Size(35, 12)&lt;br /&gt;
        Me.Label1.TabIndex = 1&lt;br /&gt;
        Me.Label1.Text = &amp;quot;0/100&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;TrackBar1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.TrackBar1.Location = New System.Drawing.Point(12, 110)&lt;br /&gt;
        Me.TrackBar1.Maximum = 100&lt;br /&gt;
        Me.TrackBar1.Name = &amp;quot;TrackBar1&amp;quot;&lt;br /&gt;
        Me.TrackBar1.Size = New System.Drawing.Size(358, 45)&lt;br /&gt;
        Me.TrackBar1.TabIndex = 2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(382, 166)&lt;br /&gt;
        Me.Controls.Add(Me.TrackBar1)&lt;br /&gt;
        Me.Controls.Add(Me.Label1)&lt;br /&gt;
        Me.Controls.Add(Me.ProgressBar1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        CType(Me.TrackBar1, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar&lt;br /&gt;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents TrackBar1 As System.Windows.Forms.TrackBar&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use TrackBar to control the Scale==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class TrackBarScale&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayScale.Scroll&lt;br /&gt;
        DrawingArea.Invalidate()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub DrawingArea_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles DrawingArea.Paint&lt;br /&gt;
        Dim titleFont As Font&lt;br /&gt;
        Dim mainFont As Font&lt;br /&gt;
        Dim titleArea As Rectangle&lt;br /&gt;
        Dim textArea As Rectangle&lt;br /&gt;
        Dim titleFormat As StringFormat&lt;br /&gt;
        Const MainTitle As String = &amp;quot;www.vbex.ru&amp;quot;&lt;br /&gt;
        titleFont = New Font(&amp;quot;Arial&amp;quot;, 16, FontStyle.Bold)&lt;br /&gt;
        mainFont = New Font(&amp;quot;Arial&amp;quot;, 12, FontStyle.Regular)&lt;br /&gt;
        titleArea = New Rectangle(0, 0, DrawingArea.ClientRectangle.Width, titleFont.Height)&lt;br /&gt;
        textArea = New Rectangle(0, titleFont.Height * 1.4, DrawingArea.ClientRectangle.Width, DrawingArea.ClientRectangle.Height - (titleFont.Height * 1.4))&lt;br /&gt;
        e.Graphics.ScaleTransform(DisplayScale.Value, DisplayScale.Value)&lt;br /&gt;
        titleFormat = New StringFormat()&lt;br /&gt;
        titleFormat.Alignment = StringAlignment.Center&lt;br /&gt;
        e.Graphics.DrawString(MainTitle, titleFont, Brushes.Black, titleArea, titleFormat)&lt;br /&gt;
        titleFormat.Dispose()&lt;br /&gt;
        mainFont.Dispose()&lt;br /&gt;
        titleFont.Dispose()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.LabelText = New System.Windows.Forms.Label&lt;br /&gt;
        Me.DisplayText = New System.Windows.Forms.TextBox&lt;br /&gt;
        Me.LabelScale = New System.Windows.Forms.Label&lt;br /&gt;
        Me.DisplayScale = New System.Windows.Forms.TrackBar&lt;br /&gt;
        Me.ActDisplay = New System.Windows.Forms.Button&lt;br /&gt;
        Me.DrawingArea = New System.Windows.Forms.PictureBox&lt;br /&gt;
        CType(Me.DisplayScale, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        CType(Me.DrawingArea, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;LabelText&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.LabelText.AutoSize = True&lt;br /&gt;
        Me.LabelText.Location = New System.Drawing.Point(8, 8)&lt;br /&gt;
        Me.LabelText.Name = &amp;quot;LabelText&amp;quot;&lt;br /&gt;
        Me.LabelText.Size = New System.Drawing.Size(31, 13)&lt;br /&gt;
        Me.LabelText.TabIndex = 0&lt;br /&gt;
        Me.LabelText.Text = &amp;quot;&amp;amp;Text:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;LabelScale&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.LabelScale.AutoSize = True&lt;br /&gt;
        Me.LabelScale.Location = New System.Drawing.Point(8, 144)&lt;br /&gt;
        Me.LabelScale.Name = &amp;quot;LabelScale&amp;quot;&lt;br /&gt;
        Me.LabelScale.Size = New System.Drawing.Size(37, 13)&lt;br /&gt;
        Me.LabelScale.TabIndex = 2&lt;br /&gt;
        Me.LabelScale.Text = &amp;quot;&amp;amp;Scale:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;DisplayScale&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.DisplayScale.Location = New System.Drawing.Point(48, 136)&lt;br /&gt;
        Me.DisplayScale.Maximum = 5&lt;br /&gt;
        Me.DisplayScale.Minimum = 1&lt;br /&gt;
        Me.DisplayScale.Name = &amp;quot;DisplayScale&amp;quot;&lt;br /&gt;
        Me.DisplayScale.Size = New System.Drawing.Size(104, 45)&lt;br /&gt;
        Me.DisplayScale.TabIndex = 3&lt;br /&gt;
        Me.DisplayScale.Value = 1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;DrawingArea&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.DrawingArea.BackColor = System.Drawing.Color.White&lt;br /&gt;
        Me.DrawingArea.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D&lt;br /&gt;
        Me.DrawingArea.Location = New System.Drawing.Point(192, 8)&lt;br /&gt;
        Me.DrawingArea.Name = &amp;quot;DrawingArea&amp;quot;&lt;br /&gt;
        Me.DrawingArea.Size = New System.Drawing.Size(328, 208)&lt;br /&gt;
        Me.DrawingArea.TabIndex = 5&lt;br /&gt;
        Me.DrawingArea.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(532, 227)&lt;br /&gt;
        Me.Controls.Add(Me.DrawingArea)&lt;br /&gt;
        Me.Controls.Add(Me.DisplayScale)&lt;br /&gt;
&lt;br /&gt;
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle&lt;br /&gt;
        Me.MaximizeBox = False&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Displaying Scaled Content&amp;quot;&lt;br /&gt;
        CType(Me.DisplayScale, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        CType(Me.DrawingArea, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents LabelText As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents DisplayText As System.Windows.Forms.TextBox&lt;br /&gt;
    Friend WithEvents LabelScale As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents DisplayScale As System.Windows.Forms.TrackBar&lt;br /&gt;
    Friend WithEvents ActDisplay As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents DrawingArea As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>