home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / pc / windows / qtw_201 / setup / samples / vbrowser / vbrowser.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-19  |  7.6 KB  |  221 lines

  1. VERSION 2.00
  2. Begin Form VBrowser 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Height          =   5025
  6.    Icon            =   VBROWSER.FRX:0000
  7.    Left            =   1005
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    MinButton       =   0   'False
  11.    ScaleHeight     =   4620
  12.    ScaleWidth      =   6555
  13.    Top             =   1770
  14.    Width           =   6675
  15.    Begin Frame fraThumbNail 
  16.       BackColor       =   &H00C0C0C0&
  17.       Height          =   1095
  18.       Left            =   838
  19.       TabIndex        =   2
  20.       Top             =   3120
  21.       Width           =   4880
  22.       Begin PictureBox picThumbNail 
  23.          BackColor       =   &H00C0C0C0&
  24.          BorderStyle     =   0  'None
  25.          Height          =   915
  26.          Index           =   4
  27.          Left            =   3660
  28.          ScaleHeight     =   915
  29.          ScaleWidth      =   1215
  30.          TabIndex        =   9
  31.          Top             =   90
  32.          Width           =   1220
  33.       End
  34.       Begin PictureBox picThumbNail 
  35.          BackColor       =   &H00C0C0C0&
  36.          BorderStyle     =   0  'None
  37.          Height          =   915
  38.          Index           =   3
  39.          Left            =   2440
  40.          ScaleHeight     =   915
  41.          ScaleWidth      =   1215
  42.          TabIndex        =   8
  43.          Top             =   90
  44.          Width           =   1220
  45.       End
  46.       Begin PictureBox picThumbNail 
  47.          BackColor       =   &H00C0C0C0&
  48.          BorderStyle     =   0  'None
  49.          Height          =   915
  50.          Index           =   2
  51.          Left            =   1220
  52.          ScaleHeight     =   915
  53.          ScaleWidth      =   1215
  54.          TabIndex        =   7
  55.          Top             =   90
  56.          Width           =   1220
  57.       End
  58.       Begin PictureBox picThumbNail 
  59.          BackColor       =   &H00C0C0C0&
  60.          BorderStyle     =   0  'None
  61.          Height          =   915
  62.          Index           =   1
  63.          Left            =   0
  64.          ScaleHeight     =   915
  65.          ScaleWidth      =   1215
  66.          TabIndex        =   6
  67.          Top             =   90
  68.          Width           =   1220
  69.       End
  70.       Begin PictureBox picStripBottom 
  71.          BorderStyle     =   0  'None
  72.          Height          =   90
  73.          Left            =   0
  74.          Picture         =   VBROWSER.FRX:0302
  75.          ScaleHeight     =   90
  76.          ScaleWidth      =   4875
  77.          TabIndex        =   5
  78.          Top             =   1005
  79.          Width           =   4880
  80.       End
  81.       Begin PictureBox picStripTop 
  82.          BorderStyle     =   0  'None
  83.          Height          =   90
  84.          Left            =   0
  85.          Picture         =   VBROWSER.FRX:0644
  86.          ScaleHeight     =   90
  87.          ScaleWidth      =   4875
  88.          TabIndex        =   4
  89.          Top             =   0
  90.          Width           =   4880
  91.       End
  92.    End
  93.    Begin Frame fraMovie 
  94.       BackColor       =   &H00C0C0C0&
  95.       Height          =   2145
  96.       Left            =   1875
  97.       TabIndex        =   0
  98.       Top             =   270
  99.       Width           =   2805
  100.       Begin QTMovie QTMovie 
  101.          AutoSize        =   -1  'True
  102.          BackColor       =   &H00FFFFFF&
  103.          BorderStyle     =   0  'None
  104.          GrowBox         =   -1  'True
  105.          Height          =   2145
  106.          Left            =   0
  107.          MovieName       =   "(none)"
  108.          OffsetX         =   0
  109.          OffsetY         =   0
  110.          TabIndex        =   1
  111.          Top             =   0
  112.          Visible         =   0   'False
  113.          Width           =   2805
  114.       End
  115.    End
  116.    Begin Label lblFileName 
  117.       Alignment       =   2  'Center
  118.       BackStyle       =   0  'Transparent
  119.       Caption         =   "lblFileName"
  120.       FontBold        =   0   'False
  121.       FontItalic      =   0   'False
  122.       FontName        =   "MS Sans Serif"
  123.       FontSize        =   9.75
  124.       FontStrikethru  =   0   'False
  125.       FontUnderline   =   0   'False
  126.       Height          =   315
  127.       Left            =   720
  128.       TabIndex        =   3
  129.       Top             =   2760
  130.       Visible         =   0   'False
  131.       Width           =   5075
  132.    End
  133.    Begin Image imgButtonLeft 
  134.       Height          =   420
  135.       Left            =   240
  136.       Picture         =   VBROWSER.FRX:0986
  137.       Top             =   3480
  138.       Width           =   420
  139.    End
  140.    Begin Image imgButtonRight 
  141.       Height          =   420
  142.       Left            =   5895
  143.       Picture         =   VBROWSER.FRX:10D0
  144.       Top             =   3480
  145.       Width           =   420
  146.    End
  147. Option Explicit
  148. Sub Form_Paint ()
  149. '   Draw a 3-D panel around each frame
  150.     DrawPanel fraMovie
  151.     DrawPanel fraThumbNail
  152. End Sub
  153. Sub Form_Unload (Cancel As Integer)
  154. '   Dispose of all the thumbnail picture handles
  155.     Dim i As Integer
  156.     For i = 1 To NumberMovies
  157.         VBDisposePicture MovieList(i).PicHandle
  158.     Next i
  159. End Sub
  160. Sub imgButtonLeft_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  161. '   Display the left button down bitmap and calculate the array offset of
  162. '   the first thumbnail
  163.     imgButtonLeft.Picture = LoadPicture("lbtndn.bmp")
  164.     If FirstOffset - 1 >= 0 Then
  165.         FirstOffset = FirstOffset - 1
  166.         ShowThumbNails
  167.     End If
  168. End Sub
  169. Sub imgButtonLeft_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  170. '   Display the left button up bitmap
  171.     imgButtonLeft.Picture = LoadPicture("lbtnup.bmp")
  172. End Sub
  173. Sub imgButtonRight_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  174. '   Display the right button down bitmap and calculate the array offset of
  175. '   the first thumbnail
  176.     imgButtonRight.Picture = LoadPicture("rbtndn.bmp")
  177.     If (FirstOffset + NUMTHUMBNAILS < NumberMovies) Then
  178.         FirstOffset = FirstOffset + 1
  179.         ShowThumbNails
  180.     End If
  181. End Sub
  182. Sub imgButtonRight_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  183. '   Display the right button up bitmap
  184.     imgButtonRight.Picture = LoadPicture("rbtnup.bmp")
  185. End Sub
  186. Sub picThumbNail_DblClick (Index As Integer)
  187. '   Set the movie name; the IgnoreClick setting prevents the movie image
  188. '   from inverting twice on a double click
  189.     IgnoreClick = True
  190.     QTMovie.MovieName = MovieList(Index + FirstOffset).MovieName
  191.     ShowMovie (Index + FirstOffset)
  192. End Sub
  193. Sub picThumbNail_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  194. '   Invert the thumbnail bitmap; set the file name caption to the movie file
  195. '   name and show it
  196.     InvertPicture picThumbNail(Index)
  197.     lblFileName.Caption = MovieList(Index + FirstOffset).MovieDesc
  198.     lblFileName.Visible = True
  199. End Sub
  200. Sub picThumbNail_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  201. '   If IgnoreClick is set turn it off and ignore the event (don't want to
  202. '   doubly invert the thumbnail bitmap); else re-invert the thumbnail bitmap
  203. '   and make the movie name label invisible
  204.     If IgnoreClick Then
  205.         IgnoreClick = False
  206.     Else
  207.         InvertPicture picThumbNail(Index)
  208.         lblFileName.Visible = False
  209.     End If
  210. End Sub
  211. Sub picThumbNail_Paint (Index As Integer)
  212. '   Paint the thumbnail bitmap using the QuickTime VBDrawPicture function
  213.     Dim osErr As Long
  214.     Dim rc As RECT
  215.     rc.left = 0
  216.     rc.top = 0
  217.     rc.right = picThumbNail(Index).Width
  218.     rc.bottom = picThumbNail(Index).Height
  219.     osErr = VBDrawPicture(picThumbNail(Index).hDC, MovieList(Index + FirstOffset).PicHandle, rc, 0&)
  220. End Sub
  221.