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

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "CD Player"
  4.    ClientHeight    =   1950
  5.    ClientLeft      =   5310
  6.    ClientTop       =   3330
  7.    ClientWidth     =   4365
  8.    Height          =   2355
  9.    Left            =   5250
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1950
  12.    ScaleWidth      =   4365
  13.    Top             =   2985
  14.    Width           =   4485
  15.    Begin VB.PictureBox picVid 
  16.       Height          =   3855
  17.       Left            =   60
  18.       ScaleHeight     =   3795
  19.       ScaleWidth      =   5235
  20.       TabIndex        =   5
  21.       Top             =   2100
  22.       Width           =   5295
  23.    End
  24.    Begin VB.Label lblStatus 
  25.       BeginProperty Font 
  26.          name            =   "MS Sans Serif"
  27.          charset         =   0
  28.          weight          =   400
  29.          size            =   12
  30.          underline       =   0   'False
  31.          italic          =   0   'False
  32.          strikethrough   =   0   'False
  33.       EndProperty
  34.       Height          =   375
  35.       Left            =   1500
  36.       TabIndex        =   6
  37.       Top             =   1380
  38.       Width           =   1275
  39.    End
  40.    Begin VB.Label Label2 
  41.       Caption         =   "Of"
  42.       BeginProperty Font 
  43.          name            =   "MS Sans Serif"
  44.          charset         =   0
  45.          weight          =   400
  46.          size            =   12
  47.          underline       =   0   'False
  48.          italic          =   0   'False
  49.          strikethrough   =   0   'False
  50.       EndProperty
  51.       Height          =   255
  52.       Left            =   2220
  53.       TabIndex        =   4
  54.       Top             =   300
  55.       Width           =   315
  56.    End
  57.    Begin VB.Label Label1 
  58.       Caption         =   "Track:"
  59.       BeginProperty Font 
  60.          name            =   "MS Sans Serif"
  61.          charset         =   0
  62.          weight          =   400
  63.          size            =   12
  64.          underline       =   0   'False
  65.          italic          =   0   'False
  66.          strikethrough   =   0   'False
  67.       EndProperty
  68.       Height          =   255
  69.       Left            =   360
  70.       TabIndex        =   3
  71.       Top             =   300
  72.       Width           =   675
  73.    End
  74.    Begin VB.Label lblTracks 
  75.       BeginProperty Font 
  76.          name            =   "MS Sans Serif"
  77.          charset         =   0
  78.          weight          =   400
  79.          size            =   12
  80.          underline       =   0   'False
  81.          italic          =   0   'False
  82.          strikethrough   =   0   'False
  83.       EndProperty
  84.       Height          =   315
  85.       Left            =   2700
  86.       TabIndex        =   2
  87.       Top             =   300
  88.       Width           =   1155
  89.    End
  90.    Begin VB.Label lblTrack 
  91.       BeginProperty Font 
  92.          name            =   "MS Sans Serif"
  93.          charset         =   0
  94.          weight          =   400
  95.          size            =   12
  96.          underline       =   0   'False
  97.          italic          =   0   'False
  98.          strikethrough   =   0   'False
  99.       EndProperty
  100.       Height          =   315
  101.       Left            =   1140
  102.       TabIndex        =   1
  103.       Top             =   300
  104.       Width           =   915
  105.    End
  106.    Begin MCI.MMControl MMControl1 
  107.       Height          =   375
  108.       Left            =   360
  109.       TabIndex        =   0
  110.       Top             =   900
  111.       Width           =   3540
  112.       _Version        =   65536
  113.       PlayEnabled     =   -1  'True
  114.       DeviceType      =   "CDAudio"
  115.       UpdateInterval  =   500
  116.       _ExtentX        =   6244
  117.       _ExtentY        =   661
  118.       _StockProps     =   32
  119.       BorderStyle     =   1
  120.    End
  121. Attribute VB_Name = "Form1"
  122. Attribute VB_Creatable = False
  123. Attribute VB_Exposed = False
  124. Private Sub Form_Load()
  125. MMControl1.DeviceType = "CDAudio"
  126. MMControl1.Command = "Open"
  127. End Sub
  128. Private Sub Form_Unload(Cancel As Integer)
  129. MMControl1.Command = "Close"
  130. End Sub
  131. Private Sub MMControl1_StatusUpdate()
  132. If MMControl1.Mode = MCI_MODE_NOT_READY Then
  133.     lblStatus.Caption = "Not Ready"
  134. ElseIf MMControl1.Mode = MCI_MODE_STOP Then
  135.     lblStatus.Caption = "Stop"
  136. ElseIf MMControl1.Mode = MCI_MODE_PLAY Then
  137.     lblStatus.Caption = "Play"
  138. ElseIf MMControl1.Mode = MCI_MODE_RECORD Then
  139.     lblStatus.Caption = "Record"
  140. ElseIf MMControl1.Mode = MCI_MODE_SEEK Then
  141.     lblStatus.Caption = "Seek"
  142. ElseIf MMControl1.Mode = MCI_MODE_PAUSE Then
  143.     lblStatus.Caption = "Pause"
  144. ElseIf MMControl1.Mode = MCI_MODE_OPEN Then
  145.     lblStatus.Caption = "Open"
  146. End If
  147. lblTrack.Caption = Str(MMControl1.Track)
  148. lblTracks.Caption = Str(MMControl1.Tracks)
  149. End Sub
  150. Private Sub Option2_Click()
  151. End Sub
  152. Private Sub optAVI_Click()
  153. ' Set properties needed by MCI to open.
  154.     Form1.MMControl1.Notify = False
  155.     Form1.MMControl1.Wait = True
  156.     Form1.MMControl1.Shareable = False
  157.     Form1.MMControl1.TimeFormat = 8 'mciFormatTmsf
  158.     Form1.MMControl1.filename = "c:\windows\help\whatson.avi"
  159.     Form1.MMControl1.hWndDisplay = picVid.hWnd
  160.     ' Open the MCI WaveAudio device.
  161.     Form1.MMControl1.Command = "Open"
  162. Me.Height = 6510
  163. End Sub
  164. Private Sub optCDA_Click()
  165. End Sub
  166. Private Sub optWAV_Click()
  167. ' Set properties needed by MCI to open.
  168.     Form1.MMControl1.Notify = False
  169.     Form1.MMControl1.Wait = True
  170.     Form1.MMControl1.Shareable = False
  171.     Form1.MMControl1.TimeFormat = 8 'mciFormatTmsf
  172.     Form1.MMControl1.filename = "c:\windows\help\whatson.avi"
  173.     Form1.MMControl1.hWndDisplay = picVid.hWnd
  174.     ' Open the MCI WaveAudio device.
  175.     Form1.MMControl1.Command = "Open"
  176. Me.Height = 2505
  177. End Sub
  178.