VERSION 5.00
Begin VB.Form Alarm 
   BackColor       =   &H00866B64&
   Caption         =   "Будильник"
   ClientHeight    =   5655
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7125
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   204
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   5655
   ScaleWidth      =   7125
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   120
      Top             =   120
   End
   Begin VB.TextBox Text4 
      BackColor       =   &H00866B64&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   5520
      TabIndex        =   17
      Top             =   1200
      Width           =   1215
   End
   Begin VB.CommandButton launch 
      Appearance      =   0  'Flat
      BackColor       =   &H00866B64&
      Caption         =   "Запустить сейчас"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5040
      MaskColor       =   &H00866B64&
      Style           =   1  'Graphical
      TabIndex        =   15
      Top             =   4320
      Width           =   1935
   End
   Begin VB.TextBox Text3 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   10
      Top             =   3480
      Width           =   2655
   End
   Begin VB.TextBox Text2 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Height          =   420
      Left            =   1200
      TabIndex        =   7
      Top             =   3480
      Width           =   495
   End
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Height          =   420
      Left            =   240
      TabIndex        =   6
      Top             =   3480
      Width           =   495
   End
   Begin VB.HScrollBar HScroll2 
      Height          =   255
      Left            =   240
      Max             =   24
      TabIndex        =   5
      Top             =   4560
      Width           =   2295
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   255
      Left            =   240
      Max             =   60
      TabIndex        =   4
      Top             =   5160
      Width           =   2295
   End
   Begin VB.CommandButton Ok 
      Appearance      =   0  'Flat
      Caption         =   "ПРИНЯТЬ"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5040
      MaskColor       =   &H00866B64&
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   5040
      Width           =   1935
   End
   Begin VB.FileListBox File1 
      BackColor       =   &H00866B64&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2235
      Left            =   2880
      TabIndex        =   2
      Top             =   600
      Width           =   2175
   End
   Begin VB.DirListBox Dir1 
      BackColor       =   &H00866B64&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1890
      Left            =   240
      TabIndex        =   1
      Top             =   600
      Width           =   2295
   End
   Begin VB.DriveListBox Drive1 
      BackColor       =   &H00866B64&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   240
      TabIndex        =   0
      Top             =   2520
      Width           =   2295
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Caption         =   "Текущее время"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5160
      TabIndex        =   16
      Top             =   720
      Width           =   1935
   End
   Begin VB.Label Label6 
      Caption         =   "Label6"
      Height          =   255
      Left            =   1080
      TabIndex        =   14
      Top             =   4680
      Width           =   15
   End
   Begin VB.Label Label5 
      BackColor       =   &H00866B64&
      Caption         =   "УСТАНОВКА ВРЕМЕНИ"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   13
      Top             =   4080
      Width           =   1935
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Caption         =   "Время запуска"
      Height          =   375
      Left            =   0
      TabIndex        =   12
      Top             =   3000
      Width           =   2415
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Caption         =   "Загружаемый файл"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   11
      Top             =   3000
      Width           =   2655
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Caption         =   "МИН"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1800
      TabIndex        =   9
      Top             =   3600
      Width           =   735
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackColor       =   &H00866B64&
      Caption         =   "Ч"
      BeginProperty Font 
         Name            =   "System"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   840
      TabIndex        =   8
      Top             =   3600
      Width           =   375
   End
End
Attribute VB_Name = "Alarm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim PEREMEN As String * 15
Dim letter As String * 15
Dim word As String
Dim word1 As String

Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_DblClick()
Text3.Text = File1
Open "c:\windows\system\alarm.txt" For Output As #1
Print #1, Text3
Print #1, Text1
Print #1, Text2
Close #1
End Sub

Private Sub Form_Load()
Open "c:\windows\system\alarm.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, letter
word = word & letter
Loop
k = 1
s = 0
For I = 1 To Len(word)
If Mid(word, I, 1) = " " Then k = 5
If k = 1 Then s = s + 1
If Mid(word, I, 1) <> " " Then word1 = word1 + Mid(word, I, 1)
Next
Text3.Text = Mid(word1, 1, s)
Text1.Text = Mid(word1, s, 2)
Text2.Text = Mid(word1, s + 2, 2)
Text3 = Mid(word1, 1, s)
Text1 = Mid(word1, s + 1, 2)
Text2 = Mid(word1, s + 3, 2)
Close #1
End Sub

Private Sub HScroll1_Change()
If HScroll1.Value < 10 Then Text2.Text = "0" + Str(HScroll1.Value) Else Text2.Text = Str(HScroll1.Value)

End Sub

Private Sub HScroll1_Scroll()
HScroll1_Change
End Sub

Private Sub HScroll2_Change()
If HScroll2.Value < 10 Then Text1.Text = "0" + Str(HScroll2.Value) Else Text1.Text = Str(HScroll2.Value)
End Sub

Private Sub HScroll2_Scroll()
HScroll2_Change
End Sub

Private Sub Ok_Click()
Open "c:\windows\system\alarm.txt" For Output As #1
Print #1, Text3
Print #1, Text1
Print #1, Text2
Close #1

End
End Sub

Private Sub Timer1_Timer()
'Load ("c:\windows\system\alarm.txt")
ss = Str(Second(Time))
mm = Str(Minute(Time))
hh = Str(Hour(Time))
Text4.Text = hh + ":" + mm + ":" + ss
End Sub
