Advertisement
D3NCE

ANIMATION IN WINFORMS – PART 6 – SELBSTZERSTÖRENDE ANWENDUNG

Dec 23rd, 2018
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. Video URL: https://www.youtube.com/watch?v=1MdTsfgz5ds
  2.  
  3. Hier findet ihr den gesamten Programmcode der Form1.cs:
  4.  
  5. using System;
  6. using System.Windows.Forms;
  7.  
  8. namespace AiWF15___Selbstzerstörende_Anwendungen
  9. {
  10. public partial class Form1 : Form
  11. {
  12. public Form1()
  13. {
  14. InitializeComponent();
  15. }
  16.  
  17. private void Form1_Load(object sender, EventArgs e)
  18. {
  19. DateTime dt1 = DateTime.Now;
  20. DateTime dt2 = DateTime.Parse("18/01/2018");
  21.  
  22. if (dt1.Date > dt2.Date)
  23. {
  24. MessageBox.Show("Die Anwendung ist abgelaufen.");
  25. Application.Exit();
  26. }
  27. else
  28. {
  29. lbl_daten.Show();
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement