Tue Aug 25, 2009 5:58 pm
Tue Aug 25, 2009 6:51 pm
Tue Aug 25, 2009 11:13 pm
Wed Aug 26, 2009 10:18 am
using System;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
public class Win32Form2 : System.Windows.Forms.Form {
private System.ComponentModel.Container components;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ProgressBar progressBar1;
public Win32Form2() {
// Required for Win Form Designer support
InitializeComponent();
}
public static void Main(string[] args) {
Application.Run(new Win32Form2());
}
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
label1.Location = new System.Drawing.Point(32, 40);
label1.Text = "Progress Value";
label1.Size = new System.Drawing.Size(88, 24);
label1.TabIndex = 2;
progressBar1.Maximum = 10;
progressBar1.Location = new System.Drawing.Point(8, 312);
progressBar1.Minimum = 0;
progressBar1.TabIndex = 0;
progressBar1.Value = 0;
progressBar1.Size = new System.Drawing.Size(520, 40);
progressBar1.Step = 1;
button1.Location = new System.Drawing.Point(152, 168);
button1.Size = new System.Drawing.Size(144, 48);
button1.TabIndex = 1;
button1.Text = "button1";
button1.Click += new System.EventHandler(button1_Click);
textBox1.Location = new System.Drawing.Point(136, 40);
textBox1.Text = "0";
textBox1.TabIndex = 3;
textBox1.Size = new System.Drawing.Size(184, 20);
this.Text = "Win32Form2";
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(616, 393);
this.Click += new System.EventHandler(Win32Form2_Click);
this.Controls.Add(textBox1);
this.Controls.Add(label1);
this.Controls.Add(button1);
this.Controls.Add(progressBar1);
}
protected void button1_Click(object sender, System.EventArgs e) {
if (progressBar1.Value == progressBar1.Maximum){
progressBar1.Value = progressBar1.Minimum;
}
progressBar1.PerformStep();
textBox1.Text=progressBar1.Value.ToString() ; // Displays the values of progressbar in textbox
}
protected void Win32Form2_Click(object sender, System.EventArgs e) {
}
}
Wed Aug 26, 2009 4:40 pm
Wed Aug 26, 2009 5:18 pm
Mon Aug 31, 2009 9:08 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.