home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / PWA_AWAR.ZIP / SAMPVB.Z / ALARM.BAS < prev    next >
Encoding:
BASIC Source File  |  1994-07-05  |  10.8 KB  |  326 lines

  1. VERSION 2.00
  2. Begin Form Alarm 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Alarm"
  6.    ClientHeight    =   6045
  7.    ClientLeft      =   915
  8.    ClientTop       =   600
  9.    ClientWidth     =   6975
  10.    ControlBox      =   0   'False
  11.    Height          =   6450
  12.    Left            =   855
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   6045
  15.    ScaleWidth      =   6975
  16.    Top             =   255
  17.    Width           =   7095
  18.    Begin AwareBinary fpBinary2 
  19.       BackColor       =   &H0080FFFF&
  20.       BorderStyle     =   0  'No Border
  21.       FontBold        =   -1  'True
  22.       FontItalic      =   0   'False
  23.       FontName        =   "System"
  24.       FontSize        =   9.75
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   495
  28.       Left            =   720
  29.       TabIndex        =   11
  30.       Top             =   1440
  31.       Width           =   495
  32.    End
  33.    Begin AwareClock fpClock1 
  34.       AlarmTime       =   "00:00:00.00"
  35.       AllowMoveHand   =   2  'Right Button
  36.       AnalogHourFill  =   -1  'True
  37.       AnalogHourFillColor=   &H000000FF&
  38.       AnalogHourHandColor=   &H00FF0000&
  39.       AnalogMinFill   =   -1  'True
  40.       AnalogMinFillColor=   &H000000FF&
  41.       AnalogMinHandColor=   &H00FF0000&
  42.       AutoSet         =   0   'False
  43.       AutoUpdate      =   0   'False
  44.       CurrentTime     =   "19:13:44.00"
  45.       FontBold        =   -1  'True
  46.       FontItalic      =   0   'False
  47.       FontName        =   "Times New Roman"
  48.       FontSize        =   12
  49.       FontStrikethru  =   0   'False
  50.       FontUnderline   =   0   'False
  51.       Height          =   375
  52.       Interval        =   "00:00:01.00"
  53.       Left            =   1560
  54.       TabIndex        =   10
  55.       TimeString1159  =   ""
  56.       TimeString2359  =   ""
  57.       Top             =   2520
  58.       Visible         =   0   'False
  59.       Width           =   1575
  60.    End
  61.    Begin AwareClock AlarmClock 
  62.       AlarmTime       =   "00:00:00.00"
  63.       AllowMoveHand   =   1  'Left Button
  64.       AutoUpdate      =   0   'False
  65.       BackColor       =   &H0080FFFF&
  66.       BorderGrayAreaColor=   &H00C0C0C0&
  67.       ClockStyle      =   2  'Analog
  68.       CurrentTime     =   "19:14:08.00"
  69.       FontBold        =   -1  'True
  70.       FontItalic      =   0   'False
  71.       FontName        =   "Times New Roman"
  72.       FontSize        =   31.5
  73.       FontStrikethru  =   0   'False
  74.       FontUnderline   =   0   'False
  75.       Height          =   2880
  76.       Interval        =   "00:00:01.00"
  77.       Left            =   480
  78.       TabIndex        =   9
  79.       ThreeDFrameWidth=   1
  80.       ThreeDInsideShadowColor=   &H00808080&
  81.       ThreeDInsideStyle=   2  'Raised
  82.       ThreeDInsideWidth=   4
  83.       ThreeDOutsideHighlightColor=   &H00FFFFFF&
  84.       ThreeDOutsideStyle=   2  'Raised
  85.       ThreeDOutsideWidth=   5
  86.       TimeString1159  =   ""
  87.       TimeString2359  =   ""
  88.       Top             =   1200
  89.       Width           =   3735
  90.    End
  91.    Begin AwareBoolean fpBoolean1 
  92.       BackColor       =   &H00C0C0C0&
  93.       BooleanPicture  =   2  '3D Check Box
  94.       BorderWidth     =   1
  95.       FontBold        =   -1  'True
  96.       FontItalic      =   0   'False
  97.       FontName        =   "MS Sans Serif"
  98.       FontSize        =   8.25
  99.       FontStrikethru  =   0   'False
  100.       FontUnderline   =   0   'False
  101.       ForeColor       =   &H000000FF&
  102.       GroupId         =   1
  103.       GroupSelect     =   3  'One and Only One
  104.       Height          =   375
  105.       Index           =   1
  106.       Left            =   4680
  107.       TabIndex        =   8
  108.       TextFalse       =   "Turn OFF Alarm"
  109.       ThreeDOutsideStyle=   1  'Lowered
  110.       Top             =   2640
  111.       Width           =   1695
  112.    End
  113.    Begin AwareBoolean fpBoolean1 
  114.       BackColor       =   &H00C0C0C0&
  115.       BooleanPicture  =   2  '3D Check Box
  116.       BorderWidth     =   1
  117.       FontBold        =   -1  'True
  118.       FontItalic      =   0   'False
  119.       FontName        =   "MS Sans Serif"
  120.       FontSize        =   8.25
  121.       FontStrikethru  =   0   'False
  122.       FontUnderline   =   0   'False
  123.       ForeColor       =   &H000000FF&
  124.       GroupId         =   1
  125.       GroupSelect     =   3  'One and Only One
  126.       Height          =   375
  127.       Index           =   0
  128.       Left            =   4680
  129.       TabIndex        =   7
  130.       TextFalse       =   "Turn ON Alarm"
  131.       ThreeDOutsideStyle=   1  'Lowered
  132.       Top             =   2160
  133.       Width           =   1695
  134.    End
  135.    Begin AwareText fpText1 
  136.       AlignTextH      =   1  'Center
  137.       AlignTextV      =   1  'Center
  138.       BackColor       =   &H00C0C0C0&
  139.       BorderStyle     =   0  'No Border
  140.       ControlType     =   2  'Static
  141.       FontBold        =   -1  'True
  142.       FontItalic      =   0   'False
  143.       FontName        =   "MS Sans Serif"
  144.       FontSize        =   9.75
  145.       FontStrikethru  =   0   'False
  146.       FontUnderline   =   0   'False
  147.       ForeColor       =   &H00FF0000&
  148.       Height          =   360
  149.       Left            =   4680
  150.       TabIndex        =   6
  151.       TabStop         =   0   'False
  152.       Text            =   "Current Time :"
  153.       ThreeDOutsideStyle=   2  'Raised
  154.       ThreeDTextHighlightColor=   &H00FFFFFF&
  155.       ThreeDTextShadowColor=   &H00808080&
  156.       Top             =   1200
  157.       Width           =   2055
  158.    End
  159.    Begin AwareClock fpClock2 
  160.       AlarmTime       =   "00:00:00.00"
  161.       AllowMoveHand   =   2  'Right Button
  162.       CurrentTime     =   "00:00:00.00"
  163.       FontBold        =   -1  'True
  164.       FontItalic      =   0   'False
  165.       FontName        =   "Times New Roman"
  166.       FontSize        =   12
  167.       FontStrikethru  =   0   'False
  168.       FontUnderline   =   0   'False
  169.       Height          =   390
  170.       Interval        =   "00:00:01.00"
  171.       Left            =   4680
  172.       TabIndex        =   5
  173.       TimeString1159  =   ""
  174.       TimeString2359  =   ""
  175.       Top             =   1560
  176.       Width           =   2055
  177.    End
  178.    Begin AwareText fpText3 
  179.       AlignTextH      =   1  'Center
  180.       AlignTextV      =   1  'Center
  181.       BackColor       =   &H00C0C0C0&
  182.       BorderStyle     =   0  'No Border
  183.       ControlType     =   2  'Static
  184.       FontBold        =   -1  'True
  185.       FontItalic      =   0   'False
  186.       FontName        =   "Times New Roman"
  187.       FontSize        =   15
  188.       FontStrikethru  =   0   'False
  189.       FontUnderline   =   0   'False
  190.       ForeColor       =   &H000000FF&
  191.       Height          =   615
  192.       Left            =   480
  193.       TabIndex        =   4
  194.       TabStop         =   0   'False
  195.       Text            =   "Drag one of the clock hands to set the alarm  :"
  196.       ThreeDOutsideStyle=   2  'Raised
  197.       ThreeDText      =   2  'Embossed w/ shading
  198.       ThreeDTextHighlightColor=   &H00FFFFFF&
  199.       ThreeDTextShadowColor=   &H00808080&
  200.       Top             =   300
  201.       Width           =   6135
  202.    End
  203.    Begin AwareText fpText2 
  204.       BackColor       =   &H00C0C0C0&
  205.       BorderStyle     =   0  'No Border
  206.       ControlType     =   2  'Static
  207.       FontBold        =   -1  'True
  208.       FontItalic      =   0   'False
  209.       FontName        =   "MS Sans Serif"
  210.       FontSize        =   8.25
  211.       FontStrikethru  =   0   'False
  212.       FontUnderline   =   0   'False
  213.       ForeColor       =   &H000000FF&
  214.       Height          =   495
  215.       Left            =   720
  216.       MultiLine       =   -1  'True
  217.       TabIndex        =   3
  218.       TabStop         =   0   'False
  219.       Text            =   "Enter the message to be displayed when alarm sounds :"
  220.       ThreeDText      =   2  'Embossed w/ shading
  221.       ThreeDTextHighlightColor=   &H00FFFFFF&
  222.       ThreeDTextShadowColor=   &H00808080&
  223.       Top             =   4440
  224.       Width           =   3135
  225.    End
  226.    Begin CommandButton Command2 
  227.       Caption         =   "Cancel"
  228.       FontBold        =   -1  'True
  229.       FontItalic      =   0   'False
  230.       FontName        =   "Times New Roman"
  231.       FontSize        =   12
  232.       FontStrikethru  =   0   'False
  233.       FontUnderline   =   0   'False
  234.       Height          =   495
  235.       Left            =   4680
  236.       TabIndex        =   2
  237.       Top             =   4200
  238.       Width           =   1455
  239.    End
  240.    Begin AwareMemo message 
  241.       FontBold        =   -1  'True
  242.       FontItalic      =   0   'False
  243.       FontName        =   "MS Sans Serif"
  244.       FontSize        =   8.25
  245.       FontStrikethru  =   0   'False
  246.       FontUnderline   =   0   'False
  247.       Height          =   855
  248.       Left            =   720
  249.       LineLimit       =   2147483647
  250.       OnFocusPosition =   3  'Caret
  251.       PageWidth       =   3495
  252.       ScrollBars      =   2  'Vertical (auto)
  253.       TabIndex        =   1
  254.       ThreeDFrameWidth=   1
  255.       ThreeDInsideStyle=   2  'Raised
  256.       ThreeDOutsideStyle=   2  'Raised
  257.       ThreeDOutsideWidth=   3
  258.       Top             =   5040
  259.       Width           =   5655
  260.       WordWrap        =   -1  'True
  261.    End
  262.    Begin CommandButton Command1 
  263.       Caption         =   "OK"
  264.       FontBold        =   -1  'True
  265.       FontItalic      =   0   'False
  266.       FontName        =   "Times New Roman"
  267.       FontSize        =   12
  268.       FontStrikethru  =   0   'False
  269.       FontUnderline   =   0   'False
  270.       Height          =   495
  271.       Left            =   4680
  272.       TabIndex        =   0
  273.       Top             =   3600
  274.       Width           =   1455
  275.    End
  276. End
  277.  
  278. Sub AlarmClock_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  279.     'Hide clock that displays alarm time in center of clock
  280.     fpClock1.Visible = False
  281. End Sub
  282.  
  283. Sub AlarmClock_MoveHand (OldHour As Integer, OldMin As Integer, OldSec As Integer, newhour As Integer, newmin As Integer, newsec As Integer)
  284.      'Show alarm time in center of clock and set current
  285.      'time of the analog clock for the displayed alarm time
  286.      fpClock1.Visible = True
  287.      fpClock1.CurrentTime = Format(newhour, "00") + ":" + Format(newmin, "00") + ":" + Format(newsec, "00")
  288. End Sub
  289.  
  290. Sub Command1_Click ()
  291.     'Turn on alarm if the value of ON = true
  292.    If fpBoolean1(0).Value = 1 Then
  293.         intro.fpClock1.AlarmTime = AlarmClock.CurrentTime
  294.    End If
  295.  
  296.    intro.Show
  297.    Me.Hide
  298. End Sub
  299.  
  300. Sub Command2_Click ()
  301.     'Cancel
  302.     intro.Show
  303.     Me.Hide
  304. End Sub
  305.  
  306. Sub Form_Load ()
  307.     'Initialize alarm clock to display the current time when loaded
  308.     centerform Me
  309.     fpClock1.CurrentTime = AlarmClock.CurrentTime
  310.     'Initialize alarm ON
  311.     fpBoolean1(0).Value = 1
  312. End Sub
  313.  
  314. Sub fpBoolean1_Change (index As Integer)
  315.     'If alarm is on then display the alarm on icon
  316.     'Else display alarm off icon
  317.     If index = 0 Then
  318.         If fpBoolean1(0).Value = 1 Then
  319.             fpBinary2.Picture = LoadPicture(app.Path + "\alarm.ico")
  320.         Else
  321.             fpBinary2.Picture = LoadPicture(app.Path + "\noalarm.ico")
  322.         End If
  323.     End If
  324. End Sub
  325.  
  326.