home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / areacode / areacode.frm (.txt) < prev    next >
Visual Basic Form  |  1980-01-04  |  5KB  |  86 lines

  1. areacode
  2. Area Code Lookup
  3. MS Sans Serif
  4. wwwwwwwwwwwwwwp
  5. wwwwwwwwwwwwwwp
  6. Form1%
  7. Command1
  8. Look Up Area Code
  9. MS Sans Serif
  10. ltime
  11. MS Sans Serif
  12. Label1
  13. Time:
  14. MS Sans Serif
  15. location
  16. MS Sans Serif
  17. Label3
  18.     Location:
  19. MS Sans Serif
  20. Label2
  21. Area Code:
  22. MS Sans Serif
  23. Form_Click
  24.     areacodes
  25.     timezones
  26.     areanames
  27. numac
  28. loadac
  29. done2
  30. tzhere
  31. Command1_Click
  32. findac+
  33. location
  34. captionr
  35. ltime
  36. @    Form_Load
  37.     ac_ChangeT
  38. selstart
  39.     sellength
  40. mousepointer
  41. tzformat
  42. Thenlocation&
  43.  All the areacodes
  44.  Timezones from GMT
  45.  Name of the Area Codest
  46.  # of areacodes 
  47.  Local time zone
  48.  How we like time/dates formattedi
  49. Command1_Click
  50.    This routine finds the area code the user has entered, displays the
  51.    location and the time at that location.  No attempt is made to handle
  52.    areacodes which are split across time zones or places that do not
  53.    go onto daylight savings time with the rest of the nation....
  54.  The current areacode as an integera
  55.    We mark the areacode the user entered as "selected", so that afterr
  56.    we finish the user can just start typing in a new area code without
  57.    having to delete the old one...
  58.    Search ...d
  59.  When we find the area code, update the location and local times...
  60.    We didn't find the area code! Beep, erase all text on the display,,
  61.    and open a message box to complain!
  62. Invalid Area Code
  63. Form_Load
  64.    When the form is first loaded, read in the area code database
  65. loadac
  66.    This routine loads in the area code file, which iss
  67.    assumed to be called "ac.dat". The file containss
  68.    two sections.  The first section contains two lines,,
  69.    the first being the local time zone (offset from GMT),,
  70.    and the second line holding the time/date format the user
  71.    prefers..
  72.    The second section contains the list of area codes, one per
  73.    line.  The format is areacode/GMT offset/name
  74.  Location of slashes in text
  75.  Fields of the text
  76.  Say we're busy 
  77. ac.dat
  78.  Open the database
  79.  Read local time zone
  80.  Read prefered format
  81.    Read in the table of areacodess
  82.    First break the line into the three pieces (/ is delimeter)
  83.    Then, assign our arrays the piecese
  84.  Decrement numac as it's past the end of the datai
  85.    Say we're not busy anymore...
  86.