home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap09 / wavplyr / mci.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-13  |  3.9 KB  |  127 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Wave Player"
  4.    ClientHeight    =   1620
  5.    ClientLeft      =   3765
  6.    ClientTop       =   3015
  7.    ClientWidth     =   4860
  8.    Height          =   2025
  9.    Left            =   3705
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1620
  12.    ScaleWidth      =   4860
  13.    Top             =   2670
  14.    Width           =   4980
  15.    Begin VB.CommandButton cmdOpen 
  16.       Caption         =   "Open"
  17.       Default         =   -1  'True
  18.       Height          =   315
  19.       Left            =   3840
  20.       TabIndex        =   4
  21.       Top             =   1200
  22.       Width           =   915
  23.    End
  24.    Begin VB.TextBox txtFileName 
  25.       Height          =   315
  26.       Left            =   1020
  27.       TabIndex        =   2
  28.       Top             =   1200
  29.       Width           =   2715
  30.    End
  31.    Begin VB.Label Label3 
  32.       Caption         =   "File Name:"
  33.       Height          =   195
  34.       Left            =   180
  35.       TabIndex        =   3
  36.       Top             =   1260
  37.       Width           =   795
  38.    End
  39.    Begin VB.Label lblStatus 
  40.       BeginProperty Font 
  41.          name            =   "MS Sans Serif"
  42.          charset         =   0
  43.          weight          =   400
  44.          size            =   12
  45.          underline       =   0   'False
  46.          italic          =   0   'False
  47.          strikethrough   =   0   'False
  48.       EndProperty
  49.       Height          =   315
  50.       Left            =   1740
  51.       TabIndex        =   1
  52.       Top             =   660
  53.       Width           =   1275
  54.    End
  55.    Begin MCI.MMControl MMControl1 
  56.       Height          =   435
  57.       Left            =   660
  58.       TabIndex        =   0
  59.       Top             =   120
  60.       Width           =   3615
  61.       _Version        =   65536
  62.       PlayEnabled     =   -1  'True
  63.       DeviceType      =   "CDAudio"
  64.       UpdateInterval  =   500
  65.       _ExtentX        =   6376
  66.       _ExtentY        =   767
  67.       _StockProps     =   32
  68.    End
  69. Attribute VB_Name = "Form1"
  70. Attribute VB_Creatable = False
  71. Attribute VB_Exposed = False
  72. Private Sub cmdOpen_Click()
  73. MMControl1.filename = txtFileName.TEXT
  74. MMControl1.Command = "Open"
  75. End Sub
  76. Private Sub Form_Load()
  77. MMControl1.DeviceType = "WaveAudio"
  78. End Sub
  79. Private Sub Form_Unload(Cancel As Integer)
  80. MMControl1.Command = "Close"
  81. End Sub
  82. Private Sub MMControl1_StatusUpdate()
  83. If MMControl1.Mode = MCI_MODE_NOT_READY Then
  84.     lblStatus.Caption = "Not Ready"
  85. ElseIf MMControl1.Mode = MCI_MODE_STOP Then
  86.     lblStatus.Caption = "Stop"
  87. ElseIf MMControl1.Mode = MCI_MODE_PLAY Then
  88.     lblStatus.Caption = "Play"
  89. ElseIf MMControl1.Mode = MCI_MODE_RECORD Then
  90.     lblStatus.Caption = "Record"
  91. ElseIf MMControl1.Mode = MCI_MODE_SEEK Then
  92.     lblStatus.Caption = "Seek"
  93. ElseIf MMControl1.Mode = MCI_MODE_PAUSE Then
  94.     lblStatus.Caption = "Pause"
  95. ElseIf MMControl1.Mode = MCI_MODE_OPEN Then
  96.     lblStatus.Caption = "Open"
  97. End If
  98. End Sub
  99. Private Sub Option2_Click()
  100. End Sub
  101. Private Sub optAVI_Click()
  102. ' Set properties needed by MCI to open.
  103.     Form1.MMControl1.Notify = False
  104.     Form1.MMControl1.Wait = True
  105.     Form1.MMControl1.Shareable = False
  106.     Form1.MMControl1.TimeFormat = 8 'mciFormatTmsf
  107.     Form1.MMControl1.filename = "c:\windows\help\whatson.avi"
  108.     Form1.MMControl1.hWndDisplay = picVid.hWnd
  109.     ' Open the MCI WaveAudio device.
  110.     Form1.MMControl1.Command = "Open"
  111. Me.Height = 6510
  112. End Sub
  113. Private Sub optCDA_Click()
  114. End Sub
  115. Private Sub optWAV_Click()
  116. ' Set properties needed by MCI to open.
  117.     Form1.MMControl1.Notify = False
  118.     Form1.MMControl1.Wait = True
  119.     Form1.MMControl1.Shareable = False
  120.     Form1.MMControl1.TimeFormat = 8 'mciFormatTmsf
  121.     Form1.MMControl1.filename = "c:\windows\help\whatson.avi"
  122.     Form1.MMControl1.hWndDisplay = picVid.hWnd
  123.     ' Open the MCI WaveAudio device.
  124.     Form1.MMControl1.Command = "Open"
  125. Me.Height = 2505
  126. End Sub
  127.