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 / INITCAL.BAS < prev    next >
Encoding:
BASIC Source File  |  1994-07-05  |  2.0 KB  |  64 lines

  1. Global selectday
  2. Global selectmonth
  3. Global selectyear
  4. Global MonName(1 To 12) As String
  5. Global DaySelected
  6. Global actforecolor
  7. Global actbackcolor
  8. Global SDate
  9. Global DbDate As String
  10. Global Loading As Integer
  11. Global Ci As Integer
  12. Global reviewing
  13. Global selectedname As String
  14. Global selectedpassword As String
  15. Global helpmenu
  16.  
  17. Global was_valid
  18.  
  19. Declare Function SetWindowPos Lib "user" (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
  20. Declare Function startsound Lib "sound.drv" () As Integer
  21. Declare Function OpenSound% Lib "sound.drv" ()
  22. Declare Function SetVoiceSound% Lib "sound.drv" (ByVal nsource%, ByVal Freq&, ByVal nDuration%)
  23. Declare Function CloseSound% Lib "sound.drv" ()
  24. Declare Function WaitSoundState% Lib "sound.drv" (ByVal mState%)
  25.  
  26. Sub centerform (f As Form)
  27. Dim Ret As Integer
  28.     
  29.     'Set window as always top mode
  30.     If Command$ <> "" Then
  31.         Ret = SetWindowPos(f.hWnd, -1, 0, 0, 0, 0, 3)
  32.     End If
  33.  
  34.     'Center form on the screen
  35.     f.Left = (screen.Width - f.Width) / 2
  36.     f.Top = (screen.Height - f.Height) / 2
  37. End Sub
  38.  
  39. Sub InitCal (whatcontrol As Control, whatdata As Control)
  40.     
  41.     'Initialize calendar
  42.     whatcontrol.Redraw = False
  43.     whatcontrol.HeaderStyle = whatdata.Recordset("header")
  44.     whatcontrol.GrayAreaStyle = whatdata.Recordset("graystyle")
  45.     whatcontrol.MonthHeaderStyle = whatdata.Recordset("monthheader")
  46.     whatcontrol.YearHeaderStyle = whatdata.Recordset("yearheader")
  47.     whatcontrol.WeekDayHdr = whatdata.Recordset("weekheader")
  48.     whatcontrol.FirstDayOfWeek = whatdata.Recordset("firstday")
  49.  
  50.     'Month Header Color
  51.     whatcontrol.Element = 1
  52.     whatcontrol.ElementBackColor = whatdata.Recordset("monbackcolor")
  53.     whatcontrol.ElementForeColor = whatdata.Recordset("monforecolor")
  54.     
  55.     'Year Header Color
  56.     whatcontrol.Element = 3
  57.     whatcontrol.ElementBackColor = whatdata.Recordset("yrbackcolor")
  58.     whatcontrol.ElementForeColor = whatdata.Recordset("yrforecolor")
  59.      
  60.     whatcontrol.Redraw = True
  61.  
  62. End Sub
  63.  
  64.