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

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