VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frmmeth2 
   BackColor       =   &H80000005&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Delay Calculator - Method 2"
   ClientHeight    =   5520
   ClientLeft      =   2430
   ClientTop       =   3540
   ClientWidth     =   5700
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5520
   ScaleWidth      =   5700
   Begin VB.TextBox cd 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Index           =   3
      Left            =   1080
      TabIndex        =   13
      Top             =   4200
      Width           =   495
   End
   Begin VB.TextBox cd 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Index           =   2
      Left            =   1080
      TabIndex        =   12
      Top             =   3720
      Width           =   495
   End
   Begin VB.TextBox cd 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Index           =   0
      Left            =   1080
      TabIndex        =   11
      Top             =   2760
      Width           =   495
   End
   Begin VB.TextBox cd 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Index           =   1
      Left            =   1080
      TabIndex        =   10
      Top             =   3240
      Width           =   495
   End
   Begin VB.CommandButton cmdsair 
      Caption         =   "&Exit"
      Height          =   375
      Left            =   4560
      TabIndex        =   9
      Top             =   4800
      Width           =   975
   End
   Begin VB.CommandButton cmdProceed4 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Proceed >"
      Height          =   375
      Index           =   3
      Left            =   3360
      TabIndex        =   8
      Top             =   4200
      Width           =   1095
   End
   Begin VB.CommandButton cmdProceed3 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Proceed >"
      Height          =   375
      Index           =   2
      Left            =   3360
      TabIndex        =   7
      Top             =   3720
      Width           =   1095
   End
   Begin VB.CommandButton cmdProceed2 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Proceed >"
      Height          =   375
      Index           =   1
      Left            =   3360
      TabIndex        =   6
      Top             =   3240
      Width           =   1095
   End
   Begin VB.CommandButton cmdProceed 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Proceed >"
      Height          =   375
      Index           =   0
      Left            =   3360
      TabIndex        =   5
      Top             =   2760
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "&Start Over"
      Height          =   375
      Left            =   3360
      TabIndex        =   4
      Top             =   4800
      Width           =   1095
   End
   Begin VB.CommandButton cmdCalcular 
      BackColor       =   &H00C0C0C0&
      Caption         =   "&Calculate"
      Height          =   375
      Left            =   3360
      TabIndex        =   3
      Top             =   1680
      Width           =   1095
   End
   Begin ComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   5265
      Width           =   5700
      _ExtentX        =   10054
      _ExtentY        =   450
      SimpleText      =   ""
      _Version        =   327682
      BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
         NumPanels       =   2
         BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   1
            Enabled         =   0   'False
            Object.Width           =   1058
            MinWidth        =   1058
            TextSave        =   "CAPS"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   6
            Alignment       =   1
            Object.Width           =   2117
            MinWidth        =   2117
            TextSave        =   "9/2/2007"
            Object.Tag             =   ""
         EndProperty
      EndProperty
   End
   Begin MSMask.MaskEdBox mskdep 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "m/d/yy h:nn"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1680
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      _Version        =   393216
      MaxLength       =   14
      Mask            =   "##/##/## ##:##"
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox mskactdep 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "m/d/yy h:nn"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   2
      Top             =   1680
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      _Version        =   393216
      MaxLength       =   14
      Mask            =   "##/##/## ##:##"
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox mskdl2 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "hh:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   14
      Top             =   3240
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      _Version        =   393216
      MaxLength       =   14
      Mask            =   "##/##/## ##:##"
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox mskdl3 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   15
      Top             =   3720
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      _Version        =   393216
      MaxLength       =   14
      Mask            =   "##/##/## ##:##"
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox mskdl4 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   16
      Top             =   4200
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      _Version        =   393216
      MaxLength       =   14
      Mask            =   "##/##/## ##:##"
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox mskdl1 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "hh:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   17
      Top             =   2760
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      _Version        =   393216
      MaxLength       =   14
      Mask            =   "##/##/## ##:##"
      PromptChar      =   "_"
   End
   Begin VB.Label stillopen 
      BackColor       =   &H80000005&
      Caption         =   "Open:"
      Height          =   255
      Left            =   3720
      TabIndex        =   37
      Top             =   2280
      Width           =   495
   End
   Begin VB.Label Label11 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   4560
      TabIndex        =   36
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label lblopen 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   4560
      TabIndex        =   25
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label10 
      BackColor       =   &H80000005&
      Caption         =   "Help?"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   1080
      TabIndex        =   35
      Top             =   4920
      Width           =   495
   End
   Begin VB.Label Label8 
      BackColor       =   &H80000005&
      Caption         =   "Delay Calculator"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   34
      Top             =   120
      Width           =   2535
   End
   Begin VB.Label Label6 
      BackColor       =   &H80000005&
      Caption         =   "Ex. DL 2:"
      Height          =   255
      Left            =   120
      TabIndex        =   33
      Top             =   4320
      Width           =   735
   End
   Begin VB.Label Label5 
      BackColor       =   &H80000005&
      Caption         =   "Ex. DL 1:"
      Height          =   255
      Left            =   120
      TabIndex        =   32
      Top             =   3840
      Width           =   735
   End
   Begin VB.Label Label4 
      BackColor       =   &H80000005&
      Caption         =   "Delay  2:"
      Height          =   255
      Left            =   120
      TabIndex        =   31
      Top             =   3360
      Width           =   735
   End
   Begin VB.Label Label3 
      BackColor       =   &H80000005&
      Caption         =   "Delay  1:"
      Height          =   255
      Left            =   120
      TabIndex        =   30
      Top             =   2880
      Width           =   735
   End
   Begin VB.Label Label7 
      BackColor       =   &H80000005&
      Caption         =   "Total Delay:"
      Height          =   255
      Left            =   4560
      TabIndex        =   29
      Top             =   1440
      Width           =   975
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000005&
      Caption         =   "Actual Departure:"
      Height          =   255
      Left            =   1800
      TabIndex        =   28
      Top             =   1440
      Width           =   1335
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000005&
      Caption         =   "Standard Departure:"
      Height          =   255
      Left            =   120
      TabIndex        =   27
      Top             =   1440
      Width           =   1575
   End
   Begin VB.Label Label9 
      BackColor       =   &H80000005&
      Caption         =   "and Reminder"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000002&
      Height          =   375
      Left            =   1320
      TabIndex        =   26
      Top             =   480
      Width           =   1815
   End
   Begin VB.Label lblres2 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   4560
      TabIndex        =   24
      Top             =   3240
      Width           =   975
   End
   Begin VB.Label lblres3 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   4560
      TabIndex        =   23
      Top             =   3720
      Width           =   975
   End
   Begin VB.Label lblres4 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "HH:mm"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1046
         SubFormatType   =   4
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   4560
      TabIndex        =   22
      Top             =   4200
      Width           =   975
   End
   Begin VB.Label lblres1 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   4560
      TabIndex        =   21
      Top             =   2760
      Width           =   975
   End
   Begin VB.Label Label15 
      BackColor       =   &H80000005&
      Caption         =   "Main Menu"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   120
      TabIndex        =   20
      Top             =   4920
      Width           =   975
   End
   Begin VB.Label Label16 
      BackColor       =   &H80000005&
      Caption         =   "Input example: dd/mm/yy hh:mm"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   120
      TabIndex        =   19
      Top             =   2160
      Width           =   2535
   End
   Begin VB.Label Label17 
      BackColor       =   &H80000005&
      Caption         =   "Please only use off blocks times."
      Height          =   255
      Left            =   120
      TabIndex        =   18
      Top             =   2400
      Width           =   3375
   End
End
Attribute VB_Name = "frmmeth2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Function calculaIntervaloTempo(intervalo)

Dim totalHoras As Long
Dim totalMinutos As Long

Dim horas As Long, minutos As Long


totalHoras = Int(CSng(intervalo * 24))
totalMinutos = Int(CSng(intervalo * 1440))

horas = totalHoras
minutos = totalMinutos Mod 60

calculaIntervaloTempo = Format(horas, "00") & ":" & Format(minutos, "00")

End Function

Function calculaIntervaloTempo2(intervalo)

End Function

Dim totalHoras As Long
Dim totalMinutos As Long

Dim horas As Long, minutos As Long


totalHoras = Int(CSng(intervalo * 24))
totalMinutos = Int(CSng(intervalo * 1440))

horas = totalHoras
minutos = totalMinutos Mod 60

calculaIntervaloTempo = Format(horas, "00") & ":" & Format(minutos, "00")
End Function

Private Sub cmdCalcular_Click()
Dim dt1 As Date
Dim dt2 As Date
dt1 = CDate(mskactdep)
dt2 = CDate(mskdep)
lblopen = calculaIntervaloTempo(dt1 - dt2)
Label11 = lblopen
End Sub

Private Sub cmdProceed_Click(Index As Integer)
Dim dt1 As Date
Dim dt2 As Date
dt1 = CDate(mskdl1)
dt2 = CDate(mskdep)
lblres1 = calculaIntervaloTempo(dt1 - dt2)


End Sub


Private Sub cmdsair_Click()
If MsgBox("Do you really want to exit the application?", vbQuestion + vbYesNo, "Delay Calculator") = vbYes Then End
End Sub


Private Sub Command1_Click()
Dim depclean As Variant
Dim depclean2 As Variant

If MsgBox("All fields will be erased! Are you sure?", vbQuestion + vbYesNo, "Delay Calculator") = vbYes Then

depclean = mskdep.Mask
mskdep.Mask = ""
mskdep.Text = ""
mskdep.Mask = depclean

depclean2 = mskactdep.Mask
mskactdep.Mask = ""
mskactdep.Text = ""
mskactdep.Mask = depclean2

lblopen = ""

cd(0) = ""
cd(1) = ""
cd(2) = ""
cd(3) = ""

depclean = mskdl(0).Mask
mskdl(0).Mask = ""
mskdl(0).Text = ""
mskdl(0).Mask = depclean

depclean = mskdl(1).Mask
mskdl(1).Mask = ""
mskdl(1).Text = ""
mskdl(1).Mask = depclean

depclean = mskdl(2).Mask
mskdl(2).Mask = ""
mskdl(2).Text = ""
mskdl(2).Mask = depclean

depclean = mskdl(3).Mask
mskdl(3).Mask = ""
mskdl(3).Text = ""
mskdl(3).Mask = depclean

lblres(0) = ""
lblres(1) = ""
lblres(2) = ""
lblres(3) = ""
mskdep.SetFocus
End If
End Sub
End Sub

