Output:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Questrion_10
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Start();
label3.Text = DateTime.Now.ToLongTimeString();
label5.Text = DateTime.Now.ToLongTimeString();
label7.Text = DateTime.Now.ToLongDateString();
}
private void timer1_Tick(object sender, EventArgs e)
{
progressBar1.Value += 1;
if (progressBar1.Value == progressBar1.Maximum)
{
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
label4.Visible = true;
label5.Visible = true;
label6.Visible = true;
label7.Visible = true;
label3.Text = DateTime.Now.ToLongTimeString();
label5.Text = DateTime.Now.ToLongTimeString();
timer1.Start();
timer1.Enabled = false;
}
}
}
}
No comments:
Post a Comment