home *** CD-ROM | disk | FTP | other *** search
/ World of Ham Radio 1997 / WOHR97_AmSoft_(1997-02-01).iso / amsoft / win95 / source.zi_ / AMSOFT.FRM < prev    next >
Text File  |  1996-04-14  |  27KB  |  875 lines

  1. VERSION 4.00
  2. Begin VB.Form frmCDRom 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "AmSoft"
  7.    ClientHeight    =   4680
  8.    ClientLeft      =   2472
  9.    ClientTop       =   1536
  10.    ClientWidth     =   5052
  11.    ControlBox      =   0   'False
  12.    ForeColor       =   &H80000008&
  13.    Height          =   5100
  14.    Icon            =   "AMSOFT.frx":0000
  15.    Left            =   2424
  16.    MaxButton       =   0   'False
  17.    ScaleHeight     =   4680
  18.    ScaleWidth      =   5052
  19.    Top             =   1164
  20.    Width           =   5148
  21.    Begin VB.CommandButton cmdNext 
  22.       Caption         =   "&Next"
  23.       BeginProperty Font 
  24.          name            =   "MS Sans Serif"
  25.          charset         =   1
  26.          weight          =   700
  27.          size            =   7.8
  28.          underline       =   0   'False
  29.          italic          =   0   'False
  30.          strikethrough   =   0   'False
  31.       EndProperty
  32.       Height          =   612
  33.       Left            =   4200
  34.       TabIndex        =   29
  35.       Top             =   3240
  36.       Width           =   732
  37.    End
  38.    Begin VB.CommandButton cmdPrev 
  39.       Caption         =   "&Prev"
  40.       BeginProperty Font 
  41.          name            =   "MS Sans Serif"
  42.          charset         =   1
  43.          weight          =   700
  44.          size            =   7.8
  45.          underline       =   0   'False
  46.          italic          =   0   'False
  47.          strikethrough   =   0   'False
  48.       EndProperty
  49.       Height          =   612
  50.       Left            =   4200
  51.       TabIndex        =   28
  52.       Top             =   2280
  53.       Width           =   732
  54.    End
  55.    Begin VB.PictureBox Picture1 
  56.       Appearance      =   0  'Flat
  57.       BackColor       =   &H80000005&
  58.       BeginProperty Font 
  59.          name            =   "MS Sans Serif"
  60.          charset         =   1
  61.          weight          =   700
  62.          size            =   7.8
  63.          underline       =   0   'False
  64.          italic          =   0   'False
  65.          strikethrough   =   0   'False
  66.       EndProperty
  67.       ForeColor       =   &H80000008&
  68.       Height          =   1812
  69.       Left            =   120
  70.       ScaleHeight     =   1788
  71.       ScaleWidth      =   948
  72.       TabIndex        =   20
  73.       Top             =   2160
  74.       Width           =   972
  75.       Begin VB.OptionButton Option2 
  76.          Appearance      =   0  'Flat
  77.          BackColor       =   &H80000005&
  78.          Caption         =   "Oldcall"
  79.          ForeColor       =   &H80000008&
  80.          Height          =   252
  81.          Left            =   120
  82.          TabIndex        =   31
  83.          Top             =   1440
  84.          Width           =   732
  85.       End
  86.       Begin VB.OptionButton Option1 
  87.          Appearance      =   0  'Flat
  88.          BackColor       =   &H80000005&
  89.          Caption         =   "None"
  90.          ForeColor       =   &H80000008&
  91.          Height          =   252
  92.          Left            =   120
  93.          TabIndex        =   30
  94.          Top             =   1200
  95.          Width           =   852
  96.       End
  97.       Begin VB.OptionButton Option9 
  98.          Appearance      =   0  'Flat
  99.          BackColor       =   &H80000005&
  100.          Caption         =   "Call"
  101.          ForeColor       =   &H80000008&
  102.          Height          =   255
  103.          Left            =   120
  104.          TabIndex        =   3
  105.          Top             =   240
  106.          Width           =   855
  107.       End
  108.       Begin VB.OptionButton Option10 
  109.          Appearance      =   0  'Flat
  110.          BackColor       =   &H80000005&
  111.          Caption         =   "Name"
  112.          ForeColor       =   &H80000008&
  113.          Height          =   255
  114.          Left            =   120
  115.          TabIndex        =   16
  116.          Top             =   480
  117.          Width           =   855
  118.       End
  119.       Begin VB.OptionButton Option11 
  120.          Appearance      =   0  'Flat
  121.          BackColor       =   &H80000005&
  122.          Caption         =   "State"
  123.          ForeColor       =   &H80000008&
  124.          Height          =   255
  125.          Left            =   120
  126.          TabIndex        =   22
  127.          Top             =   720
  128.          Width           =   855
  129.       End
  130.       Begin VB.OptionButton Option12 
  131.          Appearance      =   0  'Flat
  132.          BackColor       =   &H80000005&
  133.          Caption         =   "Zip"
  134.          ForeColor       =   &H80000008&
  135.          Height          =   255
  136.          Left            =   120
  137.          TabIndex        =   21
  138.          Top             =   960
  139.          Width           =   855
  140.       End
  141.       Begin VB.Label lblSearchBy 
  142.          Alignment       =   2  'Center
  143.          Appearance      =   0  'Flat
  144.          BackColor       =   &H80000005&
  145.          Caption         =   "Search by:"
  146.          ForeColor       =   &H00FF0000&
  147.          Height          =   252
  148.          Left            =   0
  149.          TabIndex        =   19
  150.          Top             =   0
  151.          Width           =   972
  152.       End
  153.    End
  154.    Begin VB.CommandButton cmdLogIt 
  155.       Appearance      =   0  'Flat
  156.       BackColor       =   &H80000005&
  157.       Caption         =   "&LogIt"
  158.       BeginProperty Font 
  159.          name            =   "MS Sans Serif"
  160.          charset         =   1
  161.          weight          =   700
  162.          size            =   7.8
  163.          underline       =   0   'False
  164.          italic          =   0   'False
  165.          strikethrough   =   0   'False
  166.       EndProperty
  167.       Height          =   375
  168.       Left            =   2040
  169.       TabIndex        =   18
  170.       Top             =   4200
  171.       Width           =   855
  172.    End
  173.    Begin VB.CommandButton cmdPrint 
  174.       Appearance      =   0  'Flat
  175.       BackColor       =   &H80000005&
  176.       Caption         =   "P&rint"
  177.       BeginProperty Font 
  178.          name            =   "MS Sans Serif"
  179.          charset         =   1
  180.          weight          =   700
  181.          size            =   7.8
  182.          underline       =   0   'False
  183.          italic          =   0   'False
  184.          strikethrough   =   0   'False
  185.       EndProperty
  186.       Height          =   375
  187.       Left            =   1080
  188.       TabIndex        =   17
  189.       Top             =   4200
  190.       Width           =   855
  191.    End
  192.    Begin VB.CommandButton cmdAbout 
  193.       Appearance      =   0  'Flat
  194.       BackColor       =   &H80000005&
  195.       Caption         =   "&About"
  196.       BeginProperty Font 
  197.          name            =   "MS Sans Serif"
  198.          charset         =   1
  199.          weight          =   700
  200.          size            =   7.8
  201.          underline       =   0   'False
  202.          italic          =   0   'False
  203.          strikethrough   =   0   'False
  204.       EndProperty
  205.       Height          =   375
  206.       Left            =   120
  207.       TabIndex        =   15
  208.       Top             =   4200
  209.       Width           =   855
  210.    End
  211.    Begin VB.CommandButton cmdFind 
  212.       Appearance      =   0  'Flat
  213.       BackColor       =   &H80000005&
  214.       Caption         =   "&Find"
  215.       BeginProperty Font 
  216.          name            =   "MS Sans Serif"
  217.          charset         =   1
  218.          weight          =   700
  219.          size            =   7.8
  220.          underline       =   0   'False
  221.          italic          =   0   'False
  222.          strikethrough   =   0   'False
  223.       EndProperty
  224.       Height          =   375
  225.       Left            =   3000
  226.       TabIndex        =   1
  227.       Top             =   4200
  228.       Width           =   855
  229.    End
  230.    Begin VB.CommandButton cmdExit 
  231.       Appearance      =   0  'Flat
  232.       BackColor       =   &H80000005&
  233.       Caption         =   "&Exit"
  234.       BeginProperty Font 
  235.          name            =   "MS Sans Serif"
  236.          charset         =   1
  237.          weight          =   700
  238.          size            =   7.8
  239.          underline       =   0   'False
  240.          italic          =   0   'False
  241.          strikethrough   =   0   'False
  242.       EndProperty
  243.       Height          =   375
  244.       Left            =   3960
  245.       TabIndex        =   2
  246.       Top             =   4200
  247.       Width           =   975
  248.    End
  249.    Begin VB.TextBox txtCall 
  250.       Alignment       =   2  'Center
  251.       BeginProperty Font 
  252.          name            =   "MS Sans Serif"
  253.          charset         =   1
  254.          weight          =   700
  255.          size            =   18
  256.          underline       =   0   'False
  257.          italic          =   0   'False
  258.          strikethrough   =   0   'False
  259.       EndProperty
  260.       Height          =   555
  261.       Left            =   1320
  262.       MaxLength       =   8
  263.       TabIndex        =   0
  264.       Top             =   960
  265.       Width           =   2415
  266.    End
  267.    Begin CsclockLibCtl.CurTimeCtl time1 
  268.       Height          =   252
  269.       Left            =   120
  270.       TabIndex        =   23
  271.       Top             =   1080
  272.       Width           =   1092
  273.       _version        =   262144
  274.       _extentx        =   1926
  275.       _extenty        =   445
  276.       _stockprops     =   13
  277.       forecolor       =   12582912
  278.       backcolor       =   16777215
  279.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  280.          name            =   "Arial"
  281.          charset         =   1
  282.          weight          =   700
  283.          size            =   7.21
  284.          underline       =   0   'False
  285.          italic          =   0   'False
  286.          strikethrough   =   0   'False
  287.       EndProperty
  288.       borderstyle     =   1
  289.       bordereffect    =   2
  290.       showampm        =   -1  'True
  291.       tooltip         =   ""
  292.    End
  293.    Begin CsclockLibCtl.CurTimeCtl time2 
  294.       Height          =   252
  295.       Left            =   3840
  296.       TabIndex        =   24
  297.       Top             =   1080
  298.       Width           =   1092
  299.       _version        =   262144
  300.       _extentx        =   1926
  301.       _extenty        =   445
  302.       _stockprops     =   13
  303.       forecolor       =   12582912
  304.       backcolor       =   16777215
  305.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  306.          name            =   "Arial"
  307.          charset         =   1
  308.          weight          =   700
  309.          size            =   7.21
  310.          underline       =   0   'False
  311.          italic          =   0   'False
  312.          strikethrough   =   0   'False
  313.       EndProperty
  314.       borderstyle     =   1
  315.       bordereffect    =   2
  316.       showampm        =   -1  'True
  317.       tooltip         =   ""
  318.    End
  319.    Begin VB.Label lblYourCallSign 
  320.       Alignment       =   2  'Center
  321.       AutoSize        =   -1  'True
  322.       BackColor       =   &H00FFFFFF&
  323.       BorderStyle     =   1  'Fixed Single
  324.       Caption         =   " AmSoft "
  325.       BeginProperty Font 
  326.          name            =   "MS Sans Serif"
  327.          charset         =   1
  328.          weight          =   700
  329.          size            =   24
  330.          underline       =   0   'False
  331.          italic          =   0   'False
  332.          strikethrough   =   0   'False
  333.       EndProperty
  334.       ForeColor       =   &H000000FF&
  335.       Height          =   600
  336.       Left            =   1440
  337.       TabIndex        =   27
  338.       Top             =   120
  339.       Width           =   2148
  340.    End
  341.    Begin VB.Label lblUTCTime 
  342.       Alignment       =   2  'Center
  343.       BackColor       =   &H00C0C0C0&
  344.       Caption         =   "UTC Time"
  345.       BeginProperty Font 
  346.          name            =   "MS Sans Serif"
  347.          charset         =   1
  348.          weight          =   700
  349.          size            =   7.8
  350.          underline       =   0   'False
  351.          italic          =   0   'False
  352.          strikethrough   =   0   'False
  353.       EndProperty
  354.       Height          =   252
  355.       Left            =   3840
  356.       TabIndex        =   26
  357.       Top             =   1320
  358.       Width           =   1092
  359.    End
  360.    Begin VB.Label lblLocalTime 
  361.       Alignment       =   2  'Center
  362.       BackColor       =   &H00C0C0C0&
  363.       Caption         =   "Local Time"
  364.       BeginProperty Font 
  365.          name            =   "MS Sans Serif"
  366.          charset         =   1
  367.          weight          =   700
  368.          size            =   7.8
  369.          underline       =   0   'False
  370.          italic          =   0   'False
  371.          strikethrough   =   0   'False
  372.       EndProperty
  373.       Height          =   252
  374.       Left            =   120
  375.       TabIndex        =   25
  376.       Top             =   1320
  377.       Width           =   1092
  378.    End
  379.    Begin VB.Line Line1 
  380.       BorderStyle     =   5  'Dash-Dot-Dot
  381.       BorderWidth     =   3
  382.       X1              =   1200
  383.       X2              =   4060
  384.       Y1              =   3120
  385.       Y2              =   3120
  386.    End
  387.    Begin VB.Label lblClasss 
  388.       Appearance      =   0  'Flat
  389.       BackColor       =   &H80000005&
  390.       Caption         =   "LicClass:"
  391.       ForeColor       =   &H80000008&
  392.       Height          =   192
  393.       Left            =   1260
  394.       TabIndex        =   14
  395.       Top             =   3720
  396.       Width           =   792
  397.    End
  398.    Begin VB.Label lblExp 
  399.       Appearance      =   0  'Flat
  400.       BackColor       =   &H80000005&
  401.       Caption         =   "LicExpire:"
  402.       ForeColor       =   &H80000008&
  403.       Height          =   240
  404.       Left            =   1260
  405.       TabIndex        =   13
  406.       Top             =   3480
  407.       Width           =   792
  408.    End
  409.    Begin VB.Label lblBir 
  410.       Appearance      =   0  'Flat
  411.       BackColor       =   &H80000005&
  412.       Caption         =   "Birthday:"
  413.       ForeColor       =   &H80000008&
  414.       Height          =   240
  415.       Left            =   1260
  416.       TabIndex        =   12
  417.       Top             =   3240
  418.       Width           =   792
  419.    End
  420.    Begin VB.Shape Shape1 
  421.       BorderWidth     =   2
  422.       Height          =   1812
  423.       Left            =   1200
  424.       Top             =   2160
  425.       Width           =   2892
  426.    End
  427.    Begin VB.Label lblClass 
  428.       Appearance      =   0  'Flat
  429.       BackColor       =   &H80000005&
  430.       Caption         =   "License Class"
  431.       ForeColor       =   &H80000008&
  432.       Height          =   192
  433.       Left            =   2040
  434.       TabIndex        =   11
  435.       Top             =   3720
  436.       Width           =   1992
  437.    End
  438.    Begin VB.Label lblExpires 
  439.       Appearance      =   0  'Flat
  440.       BackColor       =   &H80000005&
  441.       Caption         =   "Lic Expires"
  442.       ForeColor       =   &H80000008&
  443.       Height          =   240
  444.       Left            =   2040
  445.       TabIndex        =   10
  446.       Top             =   3480
  447.       Width           =   1992
  448.    End
  449.    Begin VB.Label lblBirth 
  450.       Appearance      =   0  'Flat
  451.       BackColor       =   &H80000005&
  452.       Caption         =   "Birthday"
  453.       ForeColor       =   &H80000008&
  454.       Height          =   240
  455.       Left            =   2040
  456.       TabIndex        =   9
  457.       Top             =   3240
  458.       Width           =   1992
  459.    End
  460.    Begin VB.Label lblCity 
  461.       Appearance      =   0  'Flat
  462.       BackColor       =   &H80000005&
  463.       Caption         =   "City, State, Zip"
  464.       ForeColor       =   &H80000008&
  465.       Height          =   240
  466.       Left            =   1260
  467.       TabIndex        =   8
  468.       Top             =   2760
  469.       Width           =   2772
  470.    End
  471.    Begin VB.Label lblAddr2 
  472.       Appearance      =   0  'Flat
  473.       BackColor       =   &H80000005&
  474.       Caption         =   "Address"
  475.       ForeColor       =   &H80000008&
  476.       Height          =   240
  477.       Left            =   1200
  478.       TabIndex        =   7
  479.       Top             =   1800
  480.       Visible         =   0   'False
  481.       Width           =   2772
  482.    End
  483.    Begin VB.Label lblAddr1 
  484.       Appearance      =   0  'Flat
  485.       BackColor       =   &H80000005&
  486.       Caption         =   "Address"
  487.       ForeColor       =   &H80000008&
  488.       Height          =   240
  489.       Left            =   1260
  490.       TabIndex        =   6
  491.       Top             =   2520
  492.       Width           =   2772
  493.    End
  494.    Begin VB.Label lblName 
  495.       Appearance      =   0  'Flat
  496.       BackColor       =   &H80000005&
  497.       Caption         =   "Name, Call"
  498.       ForeColor       =   &H80000008&
  499.       Height          =   240
  500.       Left            =   1260
  501.       TabIndex        =   5
  502.       Top             =   2280
  503.       Width           =   2772
  504.    End
  505.    Begin VB.Label lblHelp 
  506.       Alignment       =   2  'Center
  507.       Appearance      =   0  'Flat
  508.       BackColor       =   &H80000005&
  509.       BackStyle       =   0  'Transparent
  510.       Caption         =   "Enter the search data above."
  511.       BeginProperty Font 
  512.          name            =   "MS Sans Serif"
  513.          charset         =   1
  514.          weight          =   700
  515.          size            =   7.8
  516.          underline       =   0   'False
  517.          italic          =   0   'False
  518.          strikethrough   =   0   'False
  519.       EndProperty
  520.       ForeColor       =   &H000000FF&
  521.       Height          =   252
  522.       Left            =   1200
  523.       TabIndex        =   4
  524.       Top             =   1560
  525.       Width           =   2664
  526.       WordWrap        =   -1  'True
  527.    End
  528. End
  529. Attribute VB_Name = "frmCDRom"
  530. Attribute VB_Creatable = False
  531. Attribute VB_Exposed = False
  532.  
  533. Static Function FCCDate$(D$)
  534.    Yr$ = Left$(D$, 2)
  535.    Leap = 0
  536.    If Val(Yr$) Mod 4 = 0 Then Leap = 1
  537.    Dd = Val(Mid$(D$, 3))
  538.    
  539.    M = 0 'Month
  540.    DT = 0
  541.    Do
  542.       M = M + 1
  543.       MT = Val(Mid$("312831303130313130313031", M * 2 - 1, 2))
  544.       DT = DT + MT
  545.       If Leap And M = 2 Then DT = DT + 1
  546.    Loop While DT < Dd
  547.  
  548.    If DT >= Dd Then
  549.       DT = DT - MT
  550.       If Leap And M = 2 Then DT = DT - 1
  551.    End If
  552.    
  553.    Dd = (Dd - DT) 'Day
  554.    D$ = Right$(Chr$(48) + QPTrim$(Str$(M)), 2) + Chr$(47)
  555.    D$ = D$ + Right$(Chr$(48) + QPTrim$(Str$(Dd)), 2) + Chr$(47) + Yr$
  556.    FCCDate$ = D$
  557. End Function
  558.  
  559.  
  560. Static Function ConvCase$(Work$)
  561.    Call Lower(Work$)
  562.    Call ProperName(Work$)
  563.    If InStr(UCase$(Work$), "POB") <> 0 Then
  564.       Where = InStr(UCase$(Work$), "POB")
  565.       Mid$(Work$, Where, 3) = "POB"
  566.    End If
  567.    If InStr(UCase$(Work$), "AFB") <> 0 Then
  568.       Where = InStr(UCase$(Work$), "AFB")
  569.       Mid$(Work$, Where, 3) = "AFB"
  570.    End If
  571.    ConvCase$ = Work$
  572. End Function
  573.  
  574.  
  575. Sub SetIndex()
  576.     
  577.     ''NoIndex = 0
  578.     ''CallsignIndex = 1
  579.     ''NameIndex = 2
  580.     ''CityIndex = 3
  581.     ''OldCallIndex = 4
  582.     ''ZipCodeIndex = 5
  583.  
  584. CallSignCloseIndex
  585.  
  586. If CallSignSetIndex(Search) = 0 Then
  587.     MsgBox "Unable to set the index to the callsign index!"
  588.     CallSignClose
  589.     End
  590. Else
  591.     NextRec& = CallSignFirstRec&()
  592. End If
  593.     
  594. End Sub
  595.  
  596. Private Sub cmdAbout_Click()
  597.     frmAbout.Show
  598. End Sub
  599.  
  600.  
  601. Private Sub cmdExit_Click()
  602.     Unload Me
  603. End Sub
  604.  
  605. Private Sub cmdFind_Click()
  606.     FindTheCall
  607.     ShowTheCall
  608.     txtCall.SetFocus
  609. End Sub
  610.  
  611. Private Sub FindTheCall()
  612.     'iNoIndex = 0
  613.     'iCallsignIndex = 1
  614.     'iNameIndex = 2
  615.     'iCityIndex = 3
  616.     'iOldCallIndex = 4
  617.     
  618.     Screen_MouseCursor = HOURGLASS
  619.     Srch$ = UCase$(Trim$(txtCall.Text))
  620.         
  621.     If Trim$(Srch$) <> "" Then
  622.         Found& = CallSignSearchRec(Srch$)
  623.     
  624.         If Found& = 0 Then
  625.             Ok = MsgBox("Callsign was not found.", 64, "Search Complete")
  626.         Else
  627.             Record = Found&
  628.         End If
  629.     End If
  630.     Screen_MouseCursor = Default
  631. End Sub
  632.  
  633. Private Sub ShowTheCall()
  634.  
  635.     Ok = CallSignGetRecord(Record, Rcd)
  636.  
  637.     txtCall.Text = Rcd.CallSign
  638.     Rcd.LastName = ConvCase$(Rcd.LastName)
  639.     Rcd.FirstName = ConvCase$(Rcd.FirstName)
  640.     Rcd.Suffix = ConvCase$(Rcd.Suffix)
  641.     Rcd.Address = ConvCase$(Rcd.Address)
  642.     'Rcd.Address2 = ConvCase$(Rcd.Address2)
  643.     Rcd.City = ConvCase(Rcd.City)
  644.     Suffix$ = " " + Trim$(Rcd.Suffix)
  645.     If Trim$(Suffix$) <> "" Then
  646.         lblName.Caption = Trim$(Rcd.FirstName) + " " + Trim$(Rcd.Initial) + " " + Trim$(Rcd.LastName) + Suffix$ + ", " + Rcd.CallSign
  647.     Else
  648.         lblName.Caption = Trim$(Rcd.FirstName) + " " + Trim$(Rcd.Initial) + " " + Trim$(Rcd.LastName) + ", " + Rcd.CallSign
  649.     End If
  650.     lblAddr1.Caption = Trim$(Rcd.Address)
  651.     'If Trim$(Rcd.Address2) <> "" Then
  652.     '    lblAddr2.Caption = Trim$(Rcd.Address2)
  653.         lblCity.Caption = Trim$(Rcd.City) + ", " + Rcd.State + "  " + Trim$(Rcd.ZipCode)
  654.     'Else
  655.     '    lblAddr2.Caption = Trim$(Rcd.City) + ", " + Rcd.State + "  " + Trim$(Rcd.Zip)
  656.     '    lblCity.Caption = Trim$(Rcd.Address2)
  657.     'End If
  658.     lblBirth.Caption = FCCDate$(Rcd.BirthDate)
  659.     lblExpires.Caption = FCCDate$(Rcd.ExpDate)
  660.     Select Case Rcd.ClassLic
  661.         Case "N": lblClass.Caption = "Novice"
  662.         Case "T": lblClass.Caption = "Tech"
  663.         Case "P": lblClass.Caption = "Tech Plus HF"
  664.         Case "G": lblClass.Caption = "General"
  665.         Case "A": lblClass.Caption = "Advanced"
  666.         Case "E": lblClass.Caption = "Extra"
  667.         Case Else
  668.     End Select
  669.  
  670. End Sub
  671.  
  672. Private Sub cmdLogIt_Click()
  673.     If Trim$(DefaultLabelFile) = "" Then
  674.         DefaultLabelFile = "C:\AMSOFT.LBL"
  675.     End If
  676.     FreeOne = FreeFile
  677.     If LabelFileAppend Then
  678.         Open DefaultLabelFile For Append Shared As #FreeOne
  679.     Else
  680.         Open DefaultLabelFile For Output Shared As #FreeOne
  681.     End If
  682.     C = 0
  683.     Print #FreeOne, lblName.Caption: C = C + 1
  684.     Print #FreeOne, lblAddr1.Caption: C = C + 1
  685.     If Trim$(lblAddr2.Caption) <> "" Then
  686.         Print #FreeOne, lblAddr2.Caption: C = C + 1
  687.     End If
  688.     Print #FreeOne, lblCity.Caption: C = C + 1
  689.     Print #FreeOne, " "
  690.     Print #FreeOne, " "
  691.     If C = 3 Then Print #FreeOne, " "
  692.     Close #FreeOne
  693. End Sub
  694.  
  695. Private Sub cmdNext_Click()
  696.     Record = CallSignNextRec&
  697.     ShowTheCall
  698. End Sub
  699.  
  700. Private Sub cmdPrev_Click()
  701.     Record = CallSignPrevRec&
  702.     ShowTheCall
  703. End Sub
  704.  
  705. Private Sub cmdPrint_Click()
  706. 'On Local Error GoTo PrinterGone
  707.     If Trim$(PrintFile) = "" Then
  708.         PrintFile = "LPT1"
  709.     End If
  710.     
  711.     If Exist(PrintFile) Then
  712.         FreeOne = FreeFile
  713.         Open PrintFile For Output Shared As #FreeOne
  714.         C = 0
  715.         Print #FreeOne, lblName.Caption: C = C + 1
  716.         Print #FreeOne, lblAddr1.Caption: C = C + 1
  717.         'If Trim$(lblAddr2.Caption) <> "" Then
  718.         '    Print #FreeOne, lblAddr2.Caption: C = C + 1
  719.         'End If
  720.         Print #FreeOne, lblCity.Caption: C = C + 1
  721.         Print #FreeOne, " "
  722.         Print #FreeOne, " "
  723.         If C = 3 Then Print #FreeOne, " "
  724.         Close #FreeOne
  725.     Else
  726.         MsgBox "Unable to find/open " + PrintFile + "!"
  727.     End If
  728. 'Exit Sub
  729. 'PrinterGone:
  730.        ' MsgBox "Unable to find/open " + PrintFile + "!"
  731.         
  732. End Sub
  733.  
  734. Private Sub Form_Load()
  735.     Full$ = ExeName$()
  736.     Where = InStr(4, Full$, "\")
  737.     If Where <> 0 Then
  738.         Path$ = Left$(Full$, Where)
  739.         If Path$ = "C:\VB\" Then
  740.             Path$ = "C:\AMSOFT\"
  741.         End If
  742.     End If
  743.     If Exist(Path$ + "amsoft.ini") Then
  744.         FreeOne = FreeFile
  745.         Open Path$ + "amsoft.ini" For Input As #FreeOne
  746.         
  747.         While Not EOF(FreeOne)
  748.             Line Input #FreeOne, Temp$
  749.             Temp$ = Trim$(UCase$(Temp$))
  750.             If Left$(Temp$, 1) <> ";" And InStr(Temp$, "=") <> 0 Then
  751.                 If InStr(Temp$, ";") <> 0 Then
  752.                     Temp$ = Trim$(Mid$(Temp$, 1, InStr(Temp$, ";") - 1))
  753.                 End If
  754.                 Where = InStr(Temp$, "=")
  755.                 Cmd$ = Trim$(Mid$(Temp$, 1, Where - 1))
  756.                 Dat$ = Trim$(Mid$(Temp$, Where + 1))
  757.             
  758.                 Select Case Cmd$
  759.                     Case "CDROMDRIVE": Drive$ = Dat$
  760.                         If Len(Dat$) = 1 Then Drive$ = Drive$ + ":"
  761.                     Case "LABELPRINTER"
  762.                         PrintFile = Dat$
  763.                         If Trim$(Dat$) = "" Then PrintFile = "LPT1"
  764.                     Case "DEFAULTLABELFILE"
  765.                         LabelCallSign = Dat$
  766.                     Case "CALLSIGNONLABEL"
  767.                         If Dat$ = "Y" Then CallSignOnLabel = True
  768.                     Case "LABELFILEAPPEND"
  769.                         If Dat$ = "Y" Then LabelFileAppend = True
  770.                     Case "LOCALCLOCK24"
  771.                         If Dat$ = "Y" Then
  772.                             time1.TimeMode = True
  773.                         End If
  774.                     Case "LOCALCLOCKAMPM"
  775.                         If Dat$ = "Y" Then
  776.                             time1.ShowAMPM = True
  777.                         End If
  778.                     Case "LOCALHOURSOFFSET"
  779.                         time1.ZoneOffset = Val(Dat$)
  780.                     Case "UTCCLOCK24"
  781.                         If Dat$ = "Y" Then
  782.                             time2.TimeMode = True
  783.                         End If
  784.                     Case "UTCCLOCKAMPM"
  785.                         If Dat$ = "Y" Then
  786.                             time2.ShowAMPM = True
  787.                         End If
  788.                     Case "UTCHOURSOFFSET"
  789.                         time2.ZoneOffset = Val(Dat$)
  790.                     Case "YOURCALLSIGN"
  791.                         lblYourCallSign.Caption = Chr$(32) + Dat$ + Chr$(32)
  792.                     Case Else
  793.                 End Select
  794.             End If
  795.         Wend
  796.         Close #FreeOne
  797.     End If
  798.     
  799. '   Open the database...
  800.  
  801.     If Drive$ = "" Then Drive$ = "D:"
  802.     If Exist(Drive$ + "\CALLSIGN.DAT") Then
  803.         DB$ = Drive$ + "\" + Chr$(0)
  804.     ElseIf Exist("D:\CALLSIGN.DAT") Then
  805.         DB$ = "D:\" + Chr$(0)
  806.     ElseIf Exist("E:\CALLSIGN.DAT") Then
  807.         DB$ = "E:\" + Chr$(0)
  808.     ElseIf Exist("F:\CALLSIGN.DAT") Then
  809.         DB$ = "F:\" + Chr$(0)
  810.     ElseIf Exist("G:\CALLSIGN.DAT") Then
  811.         DB$ = "G:\" + Chr$(0)
  812.     End If
  813.         
  814.     Ok% = CallSignOpen%(DB$)
  815.     If Ok% = 0 Then
  816.         MsgBox "Unable to find/open CALLSIGN.DAT!"
  817.         End
  818.     End If
  819.     
  820.     Show
  821.     Option9.Value = True
  822.    ' Do
  823.    '     DoEvents
  824.    ' Loop
  825.     
  826.     
  827. End Sub
  828.  
  829. Private Sub Form_LostFocus()
  830.     'If frmCDRom.WindowState = 1 Then
  831.     '    Beep
  832.     'End If
  833. End Sub
  834.  
  835.  
  836. Private Sub Form_Unload(Cancel As Integer)
  837.     CallSignCloseIndex
  838.     CallSignClose
  839.    ' End
  840. End Sub
  841.  
  842.  
  843. Private Sub Option1_Click()
  844.     Search = 0
  845.     SetIndex
  846. End Sub
  847.  
  848. Private Sub Option10_Click()
  849.     Search = 2
  850.     SetIndex
  851. End Sub
  852.  
  853. Private Sub Option11_Click()
  854.     Search = 3
  855.     SetIndex
  856. End Sub
  857. Private Sub Option12_Click()
  858.     Search = 5
  859.     SetIndex
  860. End Sub
  861.  
  862. Private Sub Option2_Click()
  863.     Search = 4
  864.     SetIndex
  865. End Sub
  866.  
  867. Private Sub Option9_Click()
  868.     Search = 1
  869.     SetIndex
  870. End Sub
  871.  
  872. Private Sub txtCall_LostFocus()
  873.     txtCall.Text = UCase$(txtCall.Text)
  874. End Sub
  875.