Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Form2 : Form
- {
- public static System.Timers.Timer timer1;
- public Form2()
- {
- InitializeComponent();
- timer1 = new System.Timers.Timer(1000);
- timer1.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent);
- timer1.Interval = 2000;
- timer1.Enabled = true;
- }
- private void button1_Click(object sender, EventArgs e)
- {
- pictureBox1.Show();
- timer1.Start();
- }
- public void OnTimedEvent(object source, System.Timers.ElapsedEventArgs e)
- {
- pictureBox1.Hide();
- }
- }
Add Comment
Please, Sign In to add comment