Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Uptime - Form1.vb

Form1.vb

Caricato da:
Scarica il programma completo

  1. Public Class Form1
  2.     Dim temp As Double
  3.     Dim n As Environment
  4.  
  5.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  6.         Dim b As String
  7.         b = (n.TickCount / 3600000)
  8.         temp = b
  9.         tempo.Text = CStr(System.Math.Round(CDbl(b), 0)) & " ore " & CStr(System.Math.Round(CDbl((temp - (CStr(System.Math.Round(CDbl(b), 0)))) * 60), 0)) & " minuti"
  10.         If CStr(System.Math.Round(CDbl((temp - (CStr(System.Math.Round(CDbl(b), 0)))) * 60), 0)) < 0 Then
  11.             tempo.Text = CStr(System.Math.Round(CDbl(b), 0)) - 1 & " ore " & 60 + CStr(System.Math.Round(CDbl((temp - (CStr(System.Math.Round(CDbl(b), 0)))) * 60), 0)) & " minuti"
  12.         End If
  13.     End Sub
  14.  
  15.     Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
  16.         Me.Visible = True
  17.         NotifyIcon1.Visible = False
  18.     End Sub
  19.  
  20.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  21.         Me.Hide()
  22.         NotifyIcon1.Visible = True
  23.     End Sub
  24.  
  25.     Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
  26.         Process.Start("http://oenrik.it")
  27.     End Sub
  28. End Class