-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTrackBar.cs
More file actions
43 lines (37 loc) · 1.37 KB
/
TrackBar.cs
File metadata and controls
43 lines (37 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Windows.Forms;
namespace Examples {
class Form1 : Form {
// The main entry point for the application.
public static void Main() {
Application.EnableVisualStyles();
Application.Run(new Form1());
}
public Form1() {
ClientSize = new System.Drawing.Size(300, 300);
Text = "TrackBar Example";
trackBar.Parent = this;
trackBar.Location = new System.Drawing.Point(50, 50);
trackBar.Maximum = 200;
trackBar.Orientation = Orientation.Vertical;
trackBar.Size = new System.Drawing.Size(45, 200);
trackBar.TickStyle = TickStyle.None;
trackBar.ValueChanged += delegate(object sender, EventArgs e) {
progressBar.Value = trackBar.Value;
label.Text = string.Format("{0}", trackBar.Value);
};
trackBar.Value = 100;
progressBar.Parent = this;
progressBar.Location = new System.Drawing.Point(100, 50);
progressBar.Maximum = 200;
progressBar.Orientation = Orientation.Vertical;
progressBar.Size = new System.Drawing.Size(23, 200);
progressBar.Style = ProgressBarStyle.Continuous;
label.Parent = this;
label.Location = new System.Drawing.Point(150, 50);
}
private TrackBar trackBar = new TrackBar();
private Gammasoft.ProgressBar progressBar = new Gammasoft.ProgressBar();
private Label label = new Label();
}
}