VERSION 5.00
Begin VB.Form Form_Alerta 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "ALERTA GESCOL"
   ClientHeight    =   3570
   ClientLeft      =   2355
   ClientTop       =   2385
   ClientWidth     =   4485
   Icon            =   "Form_Alerta.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3570
   ScaleWidth      =   4485
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin VB.Timer Timer1 
      Left            =   3600
      Top             =   4440
   End
   Begin VB.CommandButton cmdNextTip 
      BackColor       =   &H0080FFFF&
      Caption         =   "&Siguiente"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   240
      TabIndex        =   2
      Top             =   4800
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00C0FFFF&
      Height          =   2595
      Left            =   120
      ScaleHeight     =   2535
      ScaleWidth      =   4155
      TabIndex        =   1
      Top             =   240
      Width           =   4215
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00C0FFFF&
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   495
         Left            =   120
         TabIndex        =   5
         Top             =   240
         Width           =   3855
      End
      Begin VB.Label lblTipText 
         BackColor       =   &H00C0FFFF&
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   1395
         Left            =   120
         TabIndex        =   4
         Top             =   960
         Width           =   3915
      End
   End
   Begin VB.CommandButton cmdOK 
      Cancel          =   -1  'True
      Caption         =   "&Aceptar"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   3120
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   3000
      Width           =   1215
   End
   Begin VB.CheckBox chkLoadTipsAtStartup 
      Caption         =   "&Mostrar sugerencias al iniciar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   240
      TabIndex        =   3
      Top             =   4440
      Visible         =   0   'False
      Width           =   2775
   End
   Begin VB.Label Label4 
      Caption         =   "59"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   8
      Top             =   3105
      Width           =   375
   End
   Begin VB.Label Label3 
      Caption         =   "00 :"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   720
      TabIndex        =   7
      Top             =   3105
      Width           =   495
   End
   Begin VB.Label Label2 
      Caption         =   "00 :"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   3105
      Width           =   495
   End
End
Attribute VB_Name = "Form_Alerta"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim REC1 As ADODB.Recordset
Dim rec2 As ADODB.Recordset
Dim QRY1 As String
Dim QRY2 As String
Dim b As Integer
Dim siguiente As Integer
'Dim lblCRegresiva As DateTime

Option Explicit

  
Private Sub Timer1_Timer()
    
    If Label4.Caption > 10 Then
        Label4.Caption = Label4.Caption - 1
    Else
        If Label4.Caption = "00" Then
            Label1.Caption = "ALERTA! GESCOL ESTÁ CERRÁNDOSE"
'            Form_Alerta.BackColor = &HFF&
            Picture1.BackColor = &H8080FF
'            Label2.BackColor = &HFF&
'            Label3.BackColor = &HFF&
'            Label4.BackColor = &HFF&
            Label1.BackColor = &H8080FF
            lblTipText.BackColor = &H8080FF
'            cmdOK.BackColor = &HFF&

            If lblTipText.Visible = True Then
                Label1.Visible = False
                lblTipText.Visible = False
            Else
                Label1.Visible = True
                lblTipText.Visible = True
            End If
            
            
        Else
            Label4.Caption = "0" & Label4.Caption - 1
        End If
    End If
    
End Sub

Private Sub cmdNextTip_Click()
Set rec2 = New ADODB.Recordset

siguiente = 1

Dim resb As Integer

If b = 1 Then
   b = REC1("id")
Else
    b = b - 1
End If

    QRY2 = "SELECT * FROM actualizacion WHERE id = " & b
    rec2.Open QRY2, conn
    
    Label1.Caption = rec2("titulo")
    lblTipText.Caption = rec2("descripcion")

End Sub

Private Sub cmdOK_Click()
    Unload Me
End Sub

Private Sub Form_Load()
                            
Dim alerta_titulo As String
Dim alerta_descripcion As String

Form_Alerta.BackColor = &H8000000F
Picture1.BackColor = &HC0FFFF
Label2.BackColor = &H8000000F
Label3.BackColor = &H8000000F
Label4.BackColor = &H8000000F

siguiente = 0

Set REC1 = New ADODB.Recordset

Timer1.Interval = 1000

CentrarForma Me

alerta_titulo = devuelvecampo("alerta", "", "titulo", "mostrar = 1 LIMIT 1", conn)
alerta_descripcion = devuelvecampo("alerta", "", "descripcion", "mostrar = 1 LIMIT 1", conn)

Label1.Caption = alerta_titulo
lblTipText.Caption = alerta_descripcion

End Sub

Private Sub Form_Unload(Cancel As Integer)
    'REC1.Close
    If siguiente = 1 Then
        rec2.Close
    End If
    
    Call menuhabilitado(True)
End Sub
