Timer vbnet

ajcardo

Nuovo Utente
24 Set 2010
1
0
0
Ciao a tutti sono nuovo del forum.
Non ho molta esperienza nel vb.net ma sto creando un programma che fa degli screen e che li salva in una cartella specifica.

ecco il codice di quello che ho fatto fino ad ora:


HTML:
[COLOR="navy"]Public Class Form1
    Dim j As Integer
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Button1.Text = "Start" Then
            Button1.Text = "Stop"
            System.Threading.Thread.Sleep(35000)
            Dim bmp As Bitmap = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
            Dim g As Graphics = Graphics.FromImage(bmp)
            g.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, _
                             Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy)
            g.Dispose()
            Dim gino As Double
            gino = Int((99999999999999999 - 1 + 1) * Rnd()) + 1
            bmp.Save("C:\\" & gino & ".jpg")
            Me.Show()
        Else
            If Button1.Text = "Stop" Then
                Button1.Text = "Sto uppando il file..."
                System.Threading.Thread.Sleep(300)
                Me.Close()
            End If
        End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    End Sub
End Class[/COLOR]

ora vorrei inserire un timer in modo che faccia da solo uno screen ogni 3 minuiti e che alla seconda pressione del tasto start (che dopo essere stato cliccato diventa stop) il programma si chiudesse.

Mi potete dare una mano?? non ho un idea di come si usi il timer e su google ci sono spiegazioni varie ma che nn fanno molto al mio caso..

grazie XD :p
 
Discussioni simili
Autore Titolo Forum Risposte Data
E requery e timer Database 1
otto9due Creare immagine dinamica timer (come esempio allegato) jQuery 4
A Timer countdownd di 1 ora Javascript 0
S Timer mit app inventor Sviluppo app per Android 1
Marco_88 Come fermare un timer (setTimeout) jQuery 6
Z timer al contrario Javascript 1
N Come inserire timer nei giochi del mio sito HTML e CSS 1
R Timer continuo, anche uscendo dalla pagina Javascript 17
C Creare semplice timer in Visual Basic Visual Basic 0
D Timer in JQuery jQuery 1
antonio.amazza ChangeImg and Faiding with JS - Immagini che scorrono con timer e in dissolvenza Ajax 2
N Semplice timer Snippet PHP 0
F Countdown / timer javascript Javascript 19
max_400 timer in php alla fine un'azione PHP 6
max_400 Gestire un timer con i pulsanti PHP 5
J Countdown Timer 2 Javascript 0
J Make a JavaScript Countdown Timer in OOP Javascript 0
J JavaScript Countdown Timer solution in OOP Javascript 0
borgo italia timer Javascript 1
M [VB.Net] come si usa il controllo timer? .NET Framework 1
D evento temporizzato(forse con un timer?) ASP.NET 1
L Script con Timer di apertura Classic ASP 1
S Come si ripete un azione senza l'ausilio dell' oggetto timer? Programmazione 0
E Eseguire operazioni dal server con un timer PHP 1
Cforever timer ASP.NET 0
L Button per gestire JS in WebBrowser di VBNet .NET Framework 0

Discussioni simili