home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / grafik / aviview / form1.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1995-02-27  |  4.3 KB  |  145 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "AVI Viewer"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1770
  7.    ClientWidth     =   7365
  8.    Height          =   4950
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4020
  12.    ScaleWidth      =   7365
  13.    Top             =   900
  14.    Width           =   7485
  15.    Begin FileListBox File1 
  16.       Height          =   1785
  17.       Left            =   5775
  18.       TabIndex        =   7
  19.       Top             =   315
  20.       Width           =   1485
  21.    End
  22.    Begin DriveListBox Drive1 
  23.       Height          =   315
  24.       Left            =   3990
  25.       TabIndex        =   6
  26.       Top             =   2310
  27.       Width           =   3270
  28.    End
  29.    Begin DirListBox Dir1 
  30.       Height          =   1830
  31.       Left            =   3990
  32.       TabIndex        =   5
  33.       Top             =   315
  34.       Width           =   1590
  35.    End
  36.    Begin CommandButton Command3 
  37.       Caption         =   "Pause"
  38.       Height          =   435
  39.       Left            =   1575
  40.       TabIndex        =   4
  41.       Top             =   3045
  42.       Width           =   750
  43.    End
  44.    Begin MMControl MMControl1 
  45.       BackVisible     =   0   'False
  46.       BorderStyle     =   0  'None
  47.       EjectVisible    =   0   'False
  48.       Height          =   435
  49.       Left            =   6930
  50.       NextVisible     =   0   'False
  51.       PauseVisible    =   0   'False
  52.       PlayVisible     =   0   'False
  53.       PrevVisible     =   0   'False
  54.       RecordVisible   =   0   'False
  55.       StepVisible     =   0   'False
  56.       StopVisible     =   0   'False
  57.       TabIndex        =   3
  58.       Top             =   3570
  59.       Width           =   420
  60.    End
  61.    Begin CommandButton Command2 
  62.       Caption         =   "Stop"
  63.       Height          =   435
  64.       Left            =   2415
  65.       TabIndex        =   0
  66.       Top             =   3045
  67.       Width           =   750
  68.    End
  69.    Begin CommandButton Command1 
  70.       Caption         =   "Play"
  71.       Height          =   435
  72.       Left            =   735
  73.       TabIndex        =   1
  74.       Top             =   3045
  75.       Width           =   750
  76.    End
  77.    Begin PictureBox Picture1 
  78.       Height          =   2325
  79.       Left            =   210
  80.       ScaleHeight     =   2295
  81.       ScaleWidth      =   3450
  82.       TabIndex        =   2
  83.       Top             =   315
  84.       Width           =   3480
  85.    End
  86.    Begin Label Label1 
  87.       Caption         =   "Search: *.AVI"
  88.       Height          =   225
  89.       Left            =   6090
  90.       TabIndex        =   8
  91.       Top             =   105
  92.       Width           =   1170
  93.    End
  94.    Begin Menu mnuAbout 
  95.       Caption         =   "About"
  96.       Begin Menu mnuAVIView 
  97.          Caption         =   "About AVI Viewer..."
  98.       End
  99.    End
  100. Declare Function mciSendString Lib "mmsystem" (ByVal lpstrCommand$, ByVal lpstrReturnStr As Any, ByVal wReturnLen%, ByVal hCallBack%) As Long
  101. Sub Command1_Click ()
  102.     MMControl1.FileName = File1.Path & "\" & File1
  103.     MMControl1.Command = "Open"
  104.     'Put window handle in CmdStr$
  105.     CmdStr$ = "window " + MMControl1.FileName + " handle " + Format$(picture1.hWnd)
  106.     'Send window handle to mciSendString
  107.     ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
  108.     'Put output in window
  109.     CmdStr$ = "put " + MMControl1.FileName + " destination "
  110.     ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
  111.     MMControl1.Command = "Prev"
  112.     MMControl1.Command = "Play"
  113. End Sub
  114. Sub Command2_Click ()
  115.     MMControl1.Command = "Stop"
  116. End Sub
  117. Sub Command3_Click ()
  118.     MMControl1.Command = "Pause"
  119. End Sub
  120. Sub Dir1_Change ()
  121.     File1.Path = Dir1.Path
  122. End Sub
  123. Sub Drive1_Change ()
  124.     Dir1.Path = Drive1.Drive
  125. End Sub
  126. Sub File1_Click ()
  127.     MMControl1.Command = "Close"
  128.     MMControl1.FileName = File1.Path & "\" & File1
  129. End Sub
  130. Sub File1_DblClick ()
  131.     MMControl1.Command = "Close"
  132.     MMControl1.FileName = File1.Path & "\" & File1
  133.     Command1.Value = True
  134. End Sub
  135. Sub Form_Load ()
  136.     File1.Pattern = "*.AVI"
  137.     MMControl1.Notify = False
  138.     MMControl1.Wait = True
  139.     MMControl1.Shareable = False
  140.     MMControl1.DeviceType = "AVIVideo"
  141. End Sub
  142. Sub mnuAVIView_Click ()
  143.     MsgBox "AVI Viewer by Dustin Callaway" + Chr(10) + "CompuServe ID# 72154,2326", 64, "About AVI Viewer"
  144. End Sub
  145.