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 / INTRO.BAS < prev    next >
Encoding:
BASIC Source File  |  1994-07-05  |  26.0 KB  |  767 lines

  1. VERSION 2.00
  2. Begin Form intro 
  3.    BackColor       =   &H00808080&
  4.    Caption         =   "FarPoint Technologies Appointment Book"
  5.    ClientHeight    =   6105
  6.    ClientLeft      =   480
  7.    ClientTop       =   750
  8.    ClientWidth     =   8430
  9.    Height          =   6795
  10.    Icon            =   INTRO.FRX:0000
  11.    Left            =   420
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   6105
  16.    ScaleWidth      =   8430
  17.    Top             =   120
  18.    Width           =   8550
  19.    Begin Data Data2 
  20.       Caption         =   "Data2"
  21.       Connect         =   ""
  22.       DatabaseName    =   ""
  23.       Exclusive       =   0   'False
  24.       Height          =   270
  25.       Left            =   1800
  26.       Options         =   0
  27.       ReadOnly        =   0   'False
  28.       RecordSource    =   ""
  29.       Top             =   6210
  30.       Width           =   1140
  31.    End
  32.    Begin AwareBinary fpBinary3 
  33.       BackColor       =   &H00C0C0C0&
  34.       BorderGrayAreaColor=   &H00C0C0C0&
  35.       BorderStyle     =   0  'No Border
  36.       FontBold        =   -1  'True
  37.       FontItalic      =   0   'False
  38.       FontName        =   "System"
  39.       FontSize        =   9.75
  40.       FontStrikethru  =   0   'False
  41.       FontUnderline   =   0   'False
  42.       Height          =   975
  43.       Left            =   0
  44.       TabIndex        =   9
  45.       ThreeDFrameWidth=   5
  46.       ThreeDInsideHighlightColor=   &H00FFFFFF&
  47.       ThreeDInsideShadowColor=   &H00808080&
  48.       ThreeDInsideStyle=   2  'Raised
  49.       ThreeDInsideWidth=   2
  50.       ThreeDOutsideHighlightColor=   &H00FFFFFF&
  51.       ThreeDOutsideShadowColor=   &H00808080&
  52.       ThreeDOutsideStyle=   2  'Raised
  53.       Top             =   5175
  54.       Width           =   8415
  55.       Begin AwareBoolean fpBoolean8 
  56.          BackColor       =   &H00C0C0C0&
  57.          BooleanMode     =   2  'Button-Like
  58.          BooleanPicture  =   4  'User Defined
  59.          BorderStyle     =   2  'Rounded
  60.          BorderWidth     =   1
  61.          FontBold        =   -1  'True
  62.          FontItalic      =   0   'False
  63.          FontName        =   "MS Sans Serif"
  64.          FontSize        =   9.75
  65.          FontStrikethru  =   0   'False
  66.          FontUnderline   =   0   'False
  67.          ForeColor       =   &H00FF0000&
  68.          Height          =   645
  69.          Left            =   240
  70.          PictureFalse    =   INTRO.FRX:0302
  71.          PictureFalseDisabled=   INTRO.FRX:0604
  72.          TabIndex        =   13
  73.          TextFalse       =   "About"
  74.          ThreeDOutsideStyle=   2  'Raised
  75.          ThreeDOutsideWidth=   3
  76.          ThreeDText      =   2  'Embossed w/ shading
  77.          Top             =   50
  78.          Width           =   1650
  79.       End
  80.       Begin AwareBoolean fpBoolean7 
  81.          BackColor       =   &H00C0C0C0&
  82.          BooleanMode     =   2  'Button-Like
  83.          BooleanPicture  =   4  'User Defined
  84.          BorderStyle     =   2  'Rounded
  85.          BorderWidth     =   1
  86.          FontBold        =   -1  'True
  87.          FontItalic      =   0   'False
  88.          FontName        =   "MS Sans Serif"
  89.          FontSize        =   9.75
  90.          FontStrikethru  =   0   'False
  91.          FontUnderline   =   0   'False
  92.          ForeColor       =   &H00FF0000&
  93.          Height          =   645
  94.          Left            =   2145
  95.          PictureFalse    =   INTRO.FRX:0906
  96.          PictureFalseDisabled=   INTRO.FRX:0B40
  97.          TabIndex        =   12
  98.          TextFalse       =   "Customize"
  99.          ThreeDOutsideStyle=   2  'Raised
  100.          ThreeDOutsideWidth=   3
  101.          ThreeDText      =   2  'Embossed w/ shading
  102.          Top             =   50
  103.          Width           =   1860
  104.       End
  105.       Begin AwareBoolean fpBoolean6 
  106.          BackColor       =   &H00C0C0C0&
  107.          BooleanMode     =   2  'Button-Like
  108.          BooleanPicture  =   4  'User Defined
  109.          BorderStyle     =   2  'Rounded
  110.          BorderWidth     =   1
  111.          FontBold        =   -1  'True
  112.          FontItalic      =   0   'False
  113.          FontName        =   "MS Sans Serif"
  114.          FontSize        =   9.75
  115.          FontStrikethru  =   0   'False
  116.          FontUnderline   =   0   'False
  117.          ForeColor       =   &H00FF0000&
  118.          Height          =   645
  119.          Left            =   4320
  120.          PictureFalse    =   INTRO.FRX:0D7A
  121.          PictureFalseDisabled=   INTRO.FRX:107C
  122.          TabIndex        =   11
  123.          TextFalse       =   "Help!"
  124.          ThreeDOutsideStyle=   2  'Raised
  125.          ThreeDOutsideWidth=   3
  126.          ThreeDText      =   2  'Embossed w/ shading
  127.          Top             =   50
  128.          Width           =   1650
  129.       End
  130.       Begin AwareBoolean fpBoolean4 
  131.          BackColor       =   &H00C0C0C0&
  132.          BooleanMode     =   2  'Button-Like
  133.          BooleanPicture  =   4  'User Defined
  134.          BorderStyle     =   2  'Rounded
  135.          BorderWidth     =   1
  136.          FontBold        =   -1  'True
  137.          FontItalic      =   0   'False
  138.          FontName        =   "Times New Roman"
  139.          FontSize        =   12
  140.          FontStrikethru  =   0   'False
  141.          FontUnderline   =   0   'False
  142.          ForeColor       =   &H00FF0000&
  143.          Height          =   645
  144.          Left            =   6240
  145.          PictureFalse    =   INTRO.FRX:137E
  146.          PictureFalseDisabled=   INTRO.FRX:1680
  147.          PictureTrue     =   INTRO.FRX:1982
  148.          TabIndex        =   10
  149.          TextFalse       =   "Exit"
  150.          ThreeDOutsideStyle=   2  'Raised
  151.          ThreeDOutsideWidth=   3
  152.          ThreeDText      =   2  'Embossed w/ shading
  153.          Top             =   50
  154.          Width           =   1650
  155.       End
  156.    End
  157.    Begin AwareBinary Imprint2 
  158.       BackColor       =   &H00C0C0C0&
  159.       BorderGrayAreaColor=   &H00C0C0C0&
  160.       BorderStyle     =   0  'No Border
  161.       FontBold        =   -1  'True
  162.       FontItalic      =   0   'False
  163.       FontName        =   "System"
  164.       FontSize        =   9.75
  165.       FontStrikethru  =   0   'False
  166.       FontUnderline   =   0   'False
  167.       Height          =   5175
  168.       Left            =   0
  169.       TabIndex        =   0
  170.       ThreeDFrameWidth=   5
  171.       ThreeDInsideHighlightColor=   &H00FFFFFF&
  172.       ThreeDInsideShadowColor=   &H00808080&
  173.       ThreeDInsideStyle=   2  'Raised
  174.       ThreeDInsideWidth=   2
  175.       ThreeDOutsideHighlightColor=   &H00FFFFFF&
  176.       ThreeDOutsideShadowColor=   &H00808080&
  177.       ThreeDOutsideStyle=   2  'Raised
  178.       Top             =   0
  179.       Width           =   8415
  180.       Begin Data Data3 
  181.          Caption         =   "Data3"
  182.          Connect         =   ""
  183.          DatabaseName    =   ""
  184.          Exclusive       =   0   'False
  185.          Height          =   315
  186.          Left            =   4800
  187.          Options         =   0
  188.          ReadOnly        =   0   'False
  189.          RecordSource    =   ""
  190.          Top             =   75
  191.          Visible         =   0   'False
  192.          Width           =   1140
  193.       End
  194.       Begin AwareText whoscal 
  195.          AlignTextH      =   1  'Center
  196.          AlignTextV      =   1  'Center
  197.          BackColor       =   &H00C0C0C0&
  198.          BorderStyle     =   0  'No Border
  199.          FontBold        =   -1  'True
  200.          FontItalic      =   0   'False
  201.          FontName        =   "MS Sans Serif"
  202.          FontSize        =   8.25
  203.          FontStrikethru  =   0   'False
  204.          FontUnderline   =   0   'False
  205.          ForeColor       =   &H000000FF&
  206.          Height          =   315
  207.          Left            =   675
  208.          TabIndex        =   14
  209.          Text            =   "whoscal"
  210.          ThreeDOutsideStyle=   1  'Lowered
  211.          ThreeDText      =   2  'Embossed w/ shading
  212.          ThreeDTextHighlightColor=   &H00FFFFFF&
  213.          ThreeDTextShadowColor=   &H00000010&
  214.          Top             =   75
  215.          Width           =   4065
  216.       End
  217.       Begin Data Data1 
  218.          Caption         =   "Data1"
  219.          Connect         =   ""
  220.          DatabaseName    =   ""
  221.          Exclusive       =   0   'False
  222.          Height          =   270
  223.          Left            =   5580
  224.          Options         =   0
  225.          ReadOnly        =   0   'False
  226.          RecordSource    =   ""
  227.          Top             =   4830
  228.          Visible         =   0   'False
  229.          Width           =   1455
  230.       End
  231.       Begin AwareBinary fpBinary2 
  232.          BackColor       =   &H00C0C0C0&
  233.          FontBold        =   -1  'True
  234.          FontItalic      =   0   'False
  235.          FontName        =   "System"
  236.          FontSize        =   9.75
  237.          FontStrikethru  =   0   'False
  238.          FontUnderline   =   0   'False
  239.          Height          =   2895
  240.          Left            =   5400
  241.          TabIndex        =   4
  242.          ThreeDInsideWidth=   3
  243.          ThreeDOutsideStyle=   2  'Raised
  244.          ThreeDOutsideWidth=   2
  245.          Top             =   1920
  246.          Width           =   2625
  247.          Begin AwareBoolean fpBoolean5 
  248.             AlignTextH      =   1  'Center
  249.             BackColor       =   &H00C0C0C0&
  250.             BooleanMode     =   2  'Button-Like
  251.             BooleanPicture  =   4  'User Defined
  252.             BorderColor     =   &H00000000&
  253.             BorderStyle     =   2  'Rounded
  254.             BorderWidth     =   1
  255.             FontBold        =   -1  'True
  256.             FontItalic      =   0   'False
  257.             FontName        =   "MS Sans Serif"
  258.             FontSize        =   8.25
  259.             FontStrikethru  =   0   'False
  260.             FontUnderline   =   0   'False
  261.             ForeColor       =   &H000000FF&
  262.             Height          =   600
  263.             Left            =   50
  264.             PictureFalse    =   INTRO.FRX:1C84
  265.             PictureFalseDisabled=   INTRO.FRX:1F86
  266.             TabIndex        =   8
  267.             TextFalse       =   "Set Alarm"
  268.             ThreeDInsideHighlightColor=   &H00FFFFFF&
  269.             ThreeDInsideShadowColor=   &H00808080&
  270.             ThreeDInsideWidth=   0
  271.             ThreeDOutsideShadowColor=   &H00808080&
  272.             ThreeDOutsideStyle=   2  'Raised
  273.             ThreeDOutsideWidth=   3
  274.             ThreeDTextShadowColor=   &H00808080&
  275.             Top             =   2150
  276.             Width           =   2430
  277.          End
  278.          Begin AwareBoolean fpBoolean3 
  279.             AlignTextH      =   1  'Center
  280.             BackColor       =   &H00C0C0C0&
  281.             BooleanMode     =   2  'Button-Like
  282.             BooleanPicture  =   4  'User Defined
  283.             BorderStyle     =   2  'Rounded
  284.             BorderWidth     =   1
  285.             FontBold        =   -1  'True
  286.             FontItalic      =   0   'False
  287.             FontName        =   "MS Sans Serif"
  288.             FontSize        =   8.25
  289.             FontStrikethru  =   0   'False
  290.             FontUnderline   =   0   'False
  291.             ForeColor       =   &H000000FF&
  292.             Height          =   600
  293.             Left            =   50
  294.             MultiLine       =   -1  'True
  295.             PictureFalse    =   INTRO.FRX:2288
  296.             PictureFalseDisabled=   INTRO.FRX:258A
  297.             TabIndex        =   7
  298.             TextFalse       =   "Review Today's Schedule"
  299.             ThreeDInsideHighlightColor=   &H00FFFFFF&
  300.             ThreeDInsideShadowColor=   &H00808080&
  301.             ThreeDInsideWidth=   0
  302.             ThreeDOutsideStyle=   2  'Raised
  303.             ThreeDOutsideWidth=   3
  304.             Top             =   1450
  305.             Width           =   2430
  306.          End
  307.          Begin AwareBoolean fpBoolean1 
  308.             AlignTextH      =   1  'Center
  309.             BackColor       =   &H00C0C0C0&
  310.             BooleanMode     =   2  'Button-Like
  311.             BooleanPicture  =   4  'User Defined
  312.             BorderColor     =   &H00000000&
  313.             BorderStyle     =   2  'Rounded
  314.             BorderWidth     =   1
  315.             DropShadowColor =   &H00C0C0C0&
  316.             FontBold        =   -1  'True
  317.             FontItalic      =   0   'False
  318.             FontName        =   "MS Sans Serif"
  319.             FontSize        =   8.25
  320.             FontStrikethru  =   0   'False
  321.             FontUnderline   =   0   'False
  322.             ForeColor       =   &H000000FF&
  323.             Height          =   600
  324.             Left            =   50
  325.             MultiLine       =   -1  'True
  326.             PictureFalse    =   INTRO.FRX:288C
  327.             PictureFalseDisabled=   INTRO.FRX:2B8E
  328.             PictureTrue     =   INTRO.FRX:2E90
  329.             TabIndex        =   6
  330.             TextFalse       =   "Add an Appointment"
  331.             ThreeDInsideHighlightColor=   &H00FFFFFF&
  332.             ThreeDInsideShadowColor=   &H00808080&
  333.             ThreeDInsideWidth=   0
  334.             ThreeDOutsideShadowColor=   &H00808080&
  335.             ThreeDOutsideStyle=   2  'Raised
  336.             ThreeDOutsideWidth=   3
  337.             ThreeDTextHighlightColor=   &H00C0C0C0&
  338.             Top             =   45
  339.             Width           =   2445
  340.          End
  341.          Begin AwareBoolean fpBoolean2 
  342.             AlignTextH      =   1  'Center
  343.             BackColor       =   &H00C0C0C0&
  344.             BooleanMode     =   2  'Button-Like
  345.             BooleanPicture  =   4  'User Defined
  346.             BorderStyle     =   2  'Rounded
  347.             BorderWidth     =   1
  348.             FontBold        =   -1  'True
  349.             FontItalic      =   0   'False
  350.             FontName        =   "MS Sans Serif"
  351.             FontSize        =   8.25
  352.             FontStrikethru  =   0   'False
  353.             FontUnderline   =   0   'False
  354.             ForeColor       =   &H000000FF&
  355.             Height          =   600
  356.             Left            =   50
  357.             MultiLine       =   -1  'True
  358.             PictureFalse    =   INTRO.FRX:3192
  359.             PictureFalseDisabled=   INTRO.FRX:3494
  360.             TabIndex        =   5
  361.             TextFalse       =   "Delete Day's Appointments"
  362.             ThreeDInsideHighlightColor=   &H00FFFFFF&
  363.             ThreeDInsideShadowColor=   &H00808080&
  364.             ThreeDInsideWidth=   0
  365.             ThreeDOutsideStyle=   2  'Raised
  366.             ThreeDOutsideWidth=   3
  367.             Top             =   720
  368.             Width           =   2430
  369.          End
  370.       End
  371.       Begin AwareBinary fpBinary1 
  372.          BackColor       =   &H00C0C0C0&
  373.          FontBold        =   -1  'True
  374.          FontItalic      =   0   'False
  375.          FontName        =   "System"
  376.          FontSize        =   9.75
  377.          FontStrikethru  =   0   'False
  378.          FontUnderline   =   0   'False
  379.          Height          =   1695
  380.          Left            =   5880
  381.          TabIndex        =   2
  382.          ThreeDFrameWidth=   1
  383.          ThreeDInsideStyle=   2  'Raised
  384.          ThreeDOutsideStyle=   2  'Raised
  385.          ThreeDOutsideWidth=   5
  386.          Top             =   120
  387.          Width           =   1935
  388.          Begin AwareClock fpClock1 
  389.             AlarmTime       =   "1193:02:47.29"
  390.             AllowMoveHand   =   2  'Right Button
  391.             AnalogHourFillColor=   &H000000FF&
  392.             BackColor       =   &H0080FFFF&
  393.             ClockStyle      =   2  'Analog
  394.             CurrentTime     =   "00:00:00.00"
  395.             FontBold        =   -1  'True
  396.             FontItalic      =   0   'False
  397.             FontName        =   "Times New Roman"
  398.             FontSize        =   13.5
  399.             FontStrikethru  =   0   'False
  400.             FontUnderline   =   0   'False
  401.             ForeColor       =   &H00FFFFFF&
  402.             Height          =   1470
  403.             Interval        =   "00:00:01.00"
  404.             Left            =   0
  405.             TabIndex        =   3
  406.             ThreeDFrameWidth=   2
  407.             ThreeDInsideStyle=   1  'Lowered
  408.             ThreeDInsideWidth=   3
  409.             ThreeDOutsideStyle=   2  'Raised
  410.             ThreeDOutsideWidth=   3
  411.             TimeString1159  =   ""
  412.             TimeString2359  =   ""
  413.             Top             =   0
  414.             Width           =   1695
  415.          End
  416.       End
  417.       Begin AwareCalendar cal1 
  418.          BorderGrayAreaColor=   &H00C0C0C0&
  419.          BorderStyle     =   2  'Rounded
  420.          CurrentDate     =   "19940303"
  421.          DropShadowWidth =   5
  422.          Element3DShadowWidth=   1
  423.          FontBold        =   -1  'True
  424.          FontItalic      =   0   'False
  425.          FontName        =   "MS Sans Serif"
  426.          FontSize        =   8.25
  427.          FontStrikethru  =   0   'False
  428.          FontUnderline   =   0   'False
  429.          GrayAreaBackColor=   &H00C0C0C0&
  430.          GrayAreaForeColor=   &H00FFFFFF&
  431.          Height          =   4395
  432.          Left            =   75
  433.          TabIndex        =   1
  434.          ThreeDFrameWidth=   1
  435.          ThreeDInsideShadowColor=   &H00808080&
  436.          ThreeDInsideStyle=   2  'Raised
  437.          ThreeDInsideWidth=   3
  438.          ThreeDOutsideStyle=   2  'Raised
  439.          ThreeDOutsideWidth=   3
  440.          Top             =   450
  441.          Width           =   5175
  442.       End
  443.    End
  444.    Begin Menu menu_mnu 
  445.       Caption         =   "&File"
  446.       Begin Menu Run_Mnu 
  447.          Caption         =   "&Minimize"
  448.       End
  449.       Begin Menu Quit_Mnu 
  450.          Caption         =   "&End"
  451.       End
  452.    End
  453.    Begin Menu cal_mnu 
  454.       Caption         =   "&Calendar"
  455.       Begin Menu choose_mnu 
  456.          Caption         =   "&Choose Person"
  457.       End
  458.       Begin Menu add_Mnu 
  459.          Caption         =   "&Add Person"
  460.       End
  461.       Begin Menu del_mnu 
  462.          Caption         =   "&Delete Person"
  463.       End
  464.    End
  465. End
  466.  
  467. Sub add_Mnu_Click ()
  468.  
  469.     person.cancelbt.Visible = True
  470.     person.addbt.Visible = True
  471.     person.OKbt.Visible = False
  472.     person.deletebt.Visible = False
  473.  
  474.     person.descbox.Visible = True
  475.     person.namebox.Visible = True
  476.     person.fpText3(0).Visible = True
  477.     person.fpText3(1).Visible = True
  478.     person.fpText3(2).Visible = True
  479.     person.password.Visible = True
  480.     person.fpComboBox1.Visible = False
  481.  
  482.     person.fpText1.Text = "Enter a name and brief description below to add a new person to the list:"
  483.  
  484.     person.Show
  485. End Sub
  486.  
  487. Sub cal1_Change (oldmonth As Integer, OldDay As Integer, oldyear As Integer, newmonth As Integer, NewDay As Integer, newyear As Integer, cancel As Integer)
  488.     'Sets the current day that has been selected for
  489.     'the database selection.
  490.     SelectDay = NewDay
  491.     SelectMonth = newmonth
  492.     SelectYear = newyear
  493.     DaySelected = True
  494.  
  495.     DbDate = cal1.CurrentDate
  496.     SDate = "Date = " + "'" + DbDate + "'"
  497.     'If a change has been made then update the calendar
  498.     If (oldmonth <> newmonth Or oldyear <> newyear) Then
  499.       UpdateCal
  500.    End If
  501.  
  502.  
  503. End Sub
  504.  
  505. Sub choose_mnu_Click ()
  506.     person.OKbt.Visible = True
  507.     person.cancelbt.Visible = True
  508.     person.addbt.Visible = False
  509.     person.deletebt.Visible = False
  510.  
  511.     person.descbox.Visible = False
  512.     person.namebox.Visible = False
  513.     person.fpText3(0).Visible = False
  514.     person.fpText3(1).Visible = False
  515.     person.fpText3(2).Visible = False
  516.     person.password.Visible = False
  517.  
  518.     person.fpComboBox1.Visible = True
  519.     
  520.     person.Show
  521. End Sub
  522.  
  523. Sub del_mnu_Click ()
  524.     person.cancelbt.Visible = True
  525.     person.deletebt.Visible = True
  526.     person.OKbt.Visible = False
  527.     person.addbt.Visible = False
  528.  
  529.     person.descbox.Visible = False
  530.     person.namebox.Visible = False
  531.     person.fpText3(0).Visible = False
  532.     person.fpText3(1).Visible = False
  533.     person.fpText3(2).Visible = False
  534.     person.password.Visible = False
  535.  
  536.     person.fpComboBox1.Visible = True
  537.     
  538.     person.fpText1.Text = "Choose a person and press the button to remove the person..."
  539.     person.Show
  540. End Sub
  541.  
  542. Sub Form_Activate ()
  543.  
  544.     screen.MousePointer = 11
  545.  
  546.     whoscal.Text = selectedname + "'s Calendar"
  547.  
  548.     Data1.RecordSource = "Select * From Custom Where Name = " + "'" + selectedname + "'"
  549.     Data1.Refresh
  550.  
  551.     'Update the calendar with new appointment days
  552.     UpdateCal
  553.     
  554.     'Initialize both calendars with the information that has
  555.     'previously been saved in the database.
  556.     Refresh
  557.     InitCal Intro.cal1, Data1
  558.     InitCal Custom.CustCal, Data1
  559.  
  560.     screen.MousePointer = 0
  561. End Sub
  562.  
  563. Sub Form_Load ()
  564.     Reviewing = False
  565.     selectedname = "default"
  566.     centerform Me
  567.     Refresh
  568.  
  569.     'Initialize database
  570.     Data1.DatabaseName = App.Path + "\calendar.mdb"
  571.     Data1.Connect = ""
  572.     Data1.RecordSource = "Select * From Custom Where Name = " + "'" + selectedname + "'"
  573.     Data1.Refresh
  574.  
  575.     data2.Connect = ""
  576.     data2.DatabaseName = App.Path & "\appoint.mdb"
  577.     data2.RecordSource = "appoint"
  578.    
  579.     DaySelected = False
  580.  
  581.     MonName$(1) = "Jan."
  582.     MonName$(2) = "Feb."
  583.     MonName$(3) = "March"
  584.     MonName$(4) = "April"
  585.     MonName$(5) = "May"
  586.     MonName$(6) = "June"
  587.     MonName$(7) = "July"
  588.     MonName$(8) = "Aug."
  589.     MonName$(9) = "Sept."
  590.     MonName$(10) = "Oct."
  591.     MonName$(11) = "Nov."
  592.     MonName$(12) = "Dec."
  593.     cal1.CurrentDate = Str(Now)
  594.  
  595.     'Load all icons
  596.     fpBoolean1.PictureFalse = LoadPicture(App.Path + "\book01a.ico")
  597.     fpBoolean2.PictureFalse = LoadPicture(App.Path + "\erase02.ico")
  598.     fpBoolean3.PictureFalse = LoadPicture(App.Path + "\book03.ico")
  599.     fpBoolean5.PictureFalse = LoadPicture(App.Path + "\clock03.ico")
  600.     fpBoolean8.PictureFalse = LoadPicture(App.Path + "\note04.ico")
  601.     fpBoolean7.PictureFalse = LoadPicture(App.Path + "\calup.bmp")
  602.     fpBoolean6.PictureFalse = LoadPicture(App.Path + "\misc02.ico")
  603.     fpBoolean4.PictureFalse = LoadPicture(App.Path + "\exit01.ico")
  604.     
  605. End Sub
  606.  
  607. Sub fpBoolean1_Click (Button As Integer)
  608.  
  609.     If Data1.Recordset("name") = "default" Then
  610.       MsgBox "Appointments can not be added on the default Calendar.  Please choose a person from the Calendar menu!"
  611.       Exit Sub
  612.     End If
  613.     
  614.     'Initialize which text and buttons are to be displayed
  615.     'in the Schedule form.
  616.     Schedule.Caption = "Add an Appointment on " + MonName(SelectMonth) + Str(SelectDay) + "," + Str(SelectYear)
  617.     Schedule.fpText2.Text = "Enter your appointment beside the desired time and press OK to save these entries :"
  618.     
  619.     Schedule.ok.Visible = True
  620.     Schedule.cancel.Visible = True
  621.     Schedule.del.Visible = False
  622.     
  623.     Schedule.Show
  624.     
  625. End Sub
  626.  
  627. Sub fpBoolean2_Click (Button As Integer)
  628.     
  629.     If Data1.Recordset("name") = "default" Then
  630.       MsgBox "Appointments can not be added on the default Calendar.  Please choose a person from the Calendar menu!"
  631.       Exit Sub
  632.     End If
  633.     
  634.     'Initialize which text and buttons are to be displayed
  635.     'in the Schedule form.
  636.       Schedule.Caption = "Delete an Appointment on " + MonName(SelectMonth) + Str(SelectDay) + "," + Str(SelectYear)
  637.       Schedule.del.Visible = True
  638.       Schedule.ok.Visible = False
  639.       Schedule.cancel.Visible = True
  640.       Schedule.fpText2.Text = "Highlight the appointment that you wish to remove and press DELETE :"
  641.       Schedule.Show
  642.  
  643. End Sub
  644.  
  645. Sub fpBoolean3_Click (Button As Integer)
  646.     
  647.     If Data1.Recordset("name") = "default" Then
  648.       MsgBox "Appointments can not be reviewed on the default Calendar.  Please choose a person from the Calendar menu!"
  649.       Exit Sub
  650.     End If
  651.  
  652.     Data3.Connect = ""
  653.     Data3.DatabaseName = App.Path + "\APPOINT.MDB"
  654.     Data3.RecordSource = "Select * from Appoint Where " & SDate & " And Name = " & "'" & selectedname & "'"
  655.     Data3.Refresh
  656.  
  657.     If Data3.Recordset.RecordCount = 0 Then
  658.         Beep
  659.         MsgBox "There are No Appointments on this Day", 64
  660.         Exit Sub
  661.     End If
  662.  
  663.     'Initialize which text and buttons are to be displayed
  664.     'in the Schedule form.
  665.     Intro.fpBoolean3.Value = 0
  666.     Schedule.cancel.Visible = False
  667.     Schedule.del.Visible = False
  668.     Schedule.ok.Visible = True
  669.     Schedule.Caption = "Review Appointments for " + MonName(SelectMonth) + Str(SelectDay) + "," + Str(SelectYear)
  670.     Schedule.fpText2.Text = ""
  671.     Reviewing = True
  672.     Schedule.Show
  673.   
  674. End Sub
  675.  
  676. Sub fpBoolean4_Click (Button As Integer)
  677.     End
  678. End Sub
  679.  
  680. Sub fpBoolean5_Click (Button As Integer)
  681.     'Load and show the Alarm form
  682.     alarm.Show
  683.   
  684. End Sub
  685.  
  686. Sub fpBoolean6_Click (Button As Integer)
  687.     help.Show
  688. End Sub
  689.  
  690. Sub fpBoolean7_Click (Button As Integer)
  691.  
  692.     If Data1.Recordset("name") = "default" Then
  693.       MsgBox "Appointments can not be added on the default Calendar.  Please choose a person from the Calendar menu!"
  694.       Exit Sub
  695.     End If
  696.  
  697.     Custom.Show
  698.     Me.Hide
  699. End Sub
  700.  
  701. Sub fpBoolean8_Click (Button As Integer)
  702.     about.Show
  703.     Me.Hide
  704. End Sub
  705.  
  706. Sub fpClock1_Alarm ()
  707.     'Allows the program to use the windows sound to play
  708.     'an alarm sound when activated.  This is an alternate
  709.     'way to play a sound, instead of the BEEP command.
  710.  
  711.     t = OpenSound()
  712.     duration% = 500
  713.     frequency& = 400
  714.     frequency& = frequency& * 65536
  715.     t = SetVoiceSound(1, frequency&, duration%)
  716.     t = startsound()
  717.     While (WaitSoundState(0) <> 0): Wend
  718.     t = CloseSound()
  719.  
  720.     'Displays a message box reminding the user why the alarm was set.
  721.     MsgBox alarm.message.Text, 0, "Please Remember :"
  722.  
  723. End Sub
  724.  
  725. Sub Quit_Mnu_Click ()
  726.     End
  727. End Sub
  728.  
  729. Sub Run_Mnu_Click ()
  730.     'Minimize window
  731.     Intro.WindowState = 1
  732. End Sub
  733.  
  734. Sub UpdateCal ()
  735. Dim Sql, fdate, GetDate As String
  736. Dim i As Integer
  737. 'Colors the Appointment days when a change is made
  738.      'Search for all appointment days for the selected month
  739.      
  740.      cal1.Redraw = False
  741.      GetDate = cal1.CurrentDate
  742.      fdate = "'" + Mid(GetDate, 1, 6) + "##'"
  743.      Sql = "Select * from Appoint Where Date like " & fdate & " And Name = " & "'" & selectedname & "'"
  744.  
  745.      data2.RecordSource = Sql
  746.      data2.Refresh
  747.      
  748.     'Initializes all days to the default background and foreground colors
  749.     cal1.Element = 6
  750.     For i = 1 To 31
  751.       cal1.ElementIndex = i
  752.       cal1.ElementForeColor = &H0
  753.       cal1.ElementBackColor = &HC0C0C0
  754.     Next
  755.  
  756.     'Reads and colors all days that has an appointment
  757.     While Not data2.Recordset.EOF
  758.       cal1.ElementIndex = CInt(Mid$(data2.Recordset.Fields("Date").Value, 7, 2))
  759.       cal1.ElementBackColor = Data1.Recordset("Appbackcolor")
  760.       cal1.ElementForeColor = Data1.Recordset("Appforecolor")
  761.       data2.Recordset.MoveNext
  762.     Wend
  763.     cal1.Redraw = True
  764.  
  765. End Sub
  766.  
  767.