Guest User

ucsy

a guest
Jul 5th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. Imports Microsoft.Win32
  2.  
  3. Public Class Form1
  4. 'This application is coded by MoE TAiN
  5.  
  6. Dim X, Y As Integer
  7. Dim NewPoint As System.Drawing.Point
  8.  
  9. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  10.  
  11. 'Position the Startup Position
  12. Me.Visible = False
  13. Dim xx As Integer
  14. Dim yy As Integer
  15. xx = Screen.PrimaryScreen.WorkingArea.Width - Me.Width
  16. yy = Screen.PrimaryScreen.WorkingArea.Height - Me.Height
  17. Me.Location = New Point(xx, yy)
  18.  
  19. 'Calculate remaining days
  20. Dim exDay As DateTime = "9/08/2014"
  21. Dim now As DateTime = DateTime.Now
  22. Dim diff As TimeSpan = now.Subtract(exDay)
  23.  
  24. Label1.Text = diff.Days & " Days Remaining"
  25.  
  26. 'Run Startup
  27. Dim regKey As Microsoft.Win32.RegistryKey
  28. regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
  29. regKey.SetValue(Application.ProductName, Application.ExecutablePath)
  30. regKey.Close()
  31. End Sub
  32. Private Sub Label1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDoubleClick
  33. Me.Close()
  34. 'This application is coded by MoE TAiN
  35. End Sub
  36.  
  37. Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
  38.  
  39. 'This application is coded by MoE TAiN
  40. End Sub
  41. End Class
Advertisement
Add Comment
Please, Sign In to add comment