Guest User

Untitled

a guest
May 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public partial class Form2 : Form
  2. {
  3. public static System.Timers.Timer timer1;
  4. public Form2()
  5. {
  6. InitializeComponent();
  7. timer1 = new System.Timers.Timer(1000);
  8. timer1.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent);
  9. timer1.Interval = 2000;
  10. timer1.Enabled = true;
  11. }
  12. private void button1_Click(object sender, EventArgs e)
  13. {
  14. pictureBox1.Show();
  15. timer1.Start();
  16.  
  17. }
  18. public void OnTimedEvent(object source, System.Timers.ElapsedEventArgs e)
  19. {
  20. pictureBox1.Hide();
  21. }
  22. }
Add Comment
Please, Sign In to add comment