home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / PcmRiff69031452002.psc / modPCM.bas < prev    next >
Encoding:
BASIC Source File  |  2002-04-04  |  1.3 KB  |  64 lines

  1. Attribute VB_Name = "modPCM"
  2. ' Code module and project created by "Urthman"
  3. '   http://www.jsent.biz/urthman/
  4. '   http://www.mp3.com/urthman/
  5.  
  6. Option Explicit
  7.  
  8. Global Const DT1& = 350
  9. Global Const DT2& = 440
  10.  
  11. Global Const BT1& = 480
  12. Global Const BT2& = 620
  13.  
  14. Global Const RT1& = 440
  15. Global Const RT2& = 480
  16.  
  17.  
  18. Global WavFileName As String
  19.  
  20. Private Enum OFStyle
  21.     fRead& = &H0
  22.     fWrite& = &H1
  23.     fReadWrite& = &H2
  24.     fCreate& = &H1000
  25.     fExist& = &H4000
  26. End Enum
  27.  
  28. Private Type OFSTRUCT
  29.     cBytes As Byte
  30.     fFixedDisk As Byte
  31.     nErrCode As Integer
  32.     Reserved1 As Integer
  33.     Reserved2 As Integer
  34.     szPathName As String * 128
  35. End Type
  36.  
  37. Private Declare Function OpenFile& Lib "kernel32" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As OFStyle)
  38.  
  39. Dim NullBuff As OFSTRUCT
  40.  
  41. Function FileExist(WhatFile$) As Boolean
  42.  
  43.     FileExist = (OpenFile(WhatFile, NullBuff, fExist) > 0)
  44.  
  45. End Function
  46. Sub Main()
  47.  
  48.     WavFileName = App.Path
  49.     If (Mid(WavFileName, Len(WavFileName), 1) = "\") Then
  50.         WavFileName = (WavFileName & "PcmRiff.WAV")
  51.     Else
  52.         WavFileName = (WavFileName & "\PcmRiff.WAV")
  53.     End If
  54.     
  55.     Load frmPcm
  56.     
  57.     With frmPcm
  58.         .CheckRate
  59.         .Show
  60.         .SetFocus
  61.     End With
  62.  
  63. End Sub
  64.