View Single Post
Old 11-09-2002, 20:21   #2
tas
Senior Member
 
L'Avatar di tas
 
Iscritto dal: Feb 2001
Cittā: Nordest
Messaggi: 217
Potresti impostare il timer con cadenza a 1 minuto, ad ogni evento del timer confronti l'ora di sistema con i limiti da te impostati:
Codice:
    'f č il form da aprire ed č giā stato creato da qualche altra parte
    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim hh As Byte
        Dim mm As Byte

        hh = Now.Hour
        mm = Now.Minute

        If hh = 12 And mm = 0 Then
            f.WindowState = FormWindowState.Normal
        ElseIf hh = 15 And mm = 30 Then
            f.WindowState = FormWindowState.Minimized
        ElseIf hh = 18 And mm = 45 Then
            f.WindowState = FormWindowState.Normal
        ElseIf hh = 20 And hh = 0 Then
            f.WindowState = FormWindowState.Minimized
        End If
    End Sub
tas č offline   Rispondi citando il messaggio o parte di esso