home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / mac / SiteBldr / AMOVIE / SDK / _SETUP / COMMON.Z / ocxvb01.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-04-30  |  23.9 KB  |  679 lines

  1. VERSION 4.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "ActiveMovie OCX Sample"
  5.    ClientHeight    =   2916
  6.    ClientLeft      =   972
  7.    ClientTop       =   2136
  8.    ClientWidth     =   5364
  9.    Height          =   3780
  10.    Icon            =   "ocxvb01.frx":0000
  11.    Left            =   924
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2916
  16.    ScaleWidth      =   5364
  17.    ShowInTaskbar   =   0   'False
  18.    Top             =   1320
  19.    Width           =   5460
  20.    Begin VB.Frame frmImageSize 
  21.       Caption         =   "Change Image Size"
  22.       Enabled         =   0   'False
  23.       Height          =   2292
  24.       Left            =   2880
  25.       TabIndex        =   9
  26.       Top             =   120
  27.       Width           =   2292
  28.       Begin VB.OptionButton obNoRestrictions 
  29.          Caption         =   "No Restrictions"
  30.          Enabled         =   0   'False
  31.          Height          =   255
  32.          Left            =   240
  33.          TabIndex        =   16
  34.          Top             =   1800
  35.          Width           =   1455
  36.       End
  37.       Begin VB.OptionButton obFixedAspectRatio 
  38.          Caption         =   "Fixed Aspect Ratio"
  39.          Enabled         =   0   'False
  40.          Height          =   252
  41.          Left            =   240
  42.          TabIndex        =   15
  43.          Top             =   1560
  44.          Width           =   1692
  45.       End
  46.       Begin VB.OptionButton obFullScreen 
  47.          Caption         =   "Full Screen"
  48.          Enabled         =   0   'False
  49.          Height          =   255
  50.          Left            =   240
  51.          TabIndex        =   14
  52.          Top             =   1320
  53.          Width           =   1455
  54.       End
  55.       Begin VB.OptionButton obMaximize 
  56.          Caption         =   "Maximize"
  57.          Enabled         =   0   'False
  58.          Height          =   255
  59.          Left            =   240
  60.          TabIndex        =   13
  61.          Top             =   1080
  62.          Width           =   1335
  63.       End
  64.       Begin VB.OptionButton obDouble 
  65.          Caption         =   "Double"
  66.          Height          =   255
  67.          Left            =   240
  68.          TabIndex        =   12
  69.          Top             =   840
  70.          Width           =   855
  71.       End
  72.       Begin VB.OptionButton obHalf 
  73.          Caption         =   "Half"
  74.          Height          =   255
  75.          Left            =   240
  76.          TabIndex        =   11
  77.          Top             =   600
  78.          Width           =   975
  79.       End
  80.       Begin VB.OptionButton obDefault 
  81.          Caption         =   "Default"
  82.          Height          =   255
  83.          Left            =   240
  84.          TabIndex        =   10
  85.          Top             =   360
  86.          Width           =   1095
  87.       End
  88.    End
  89.    Begin VB.Frame frmPlaybackRate 
  90.       Caption         =   "Change Playback Rate"
  91.       Height          =   1212
  92.       Left            =   240
  93.       TabIndex        =   4
  94.       Top             =   1200
  95.       Width           =   2412
  96.       Begin VB.Label Label3 
  97.          Alignment       =   2  'Center
  98.          Caption         =   "1.5"
  99.          Height          =   252
  100.          Left            =   1860
  101.          TabIndex        =   8
  102.          Top             =   840
  103.          Width           =   252
  104.       End
  105.       Begin VB.Label Label2 
  106.          Alignment       =   2  'Center
  107.          Caption         =   "1.0"
  108.          Height          =   252
  109.          Left            =   1020
  110.          TabIndex        =   7
  111.          Top             =   840
  112.          Width           =   372
  113.       End
  114.       Begin VB.Label Label1 
  115.          Alignment       =   2  'Center
  116.          Caption         =   "0.5"
  117.          Height          =   252
  118.          Left            =   240
  119.          TabIndex        =   6
  120.          Top             =   840
  121.          Width           =   372
  122.       End
  123.       Begin ComctlLib.Slider Slider1 
  124.          Height          =   492
  125.          Left            =   240
  126.          TabIndex        =   5
  127.          Top             =   240
  128.          Width           =   1932
  129.          _Version        =   65536
  130.          _ExtentX        =   3408
  131.          _ExtentY        =   868
  132.          _StockProps     =   64
  133.          Enabled         =   0   'False
  134.          LargeChange     =   1
  135.          TickStyle       =   2
  136.       End
  137.    End
  138.    Begin VB.Frame frmChangeFrames 
  139.       Caption         =   "Change Current Position"
  140.       Height          =   972
  141.       Left            =   240
  142.       TabIndex        =   1
  143.       Top             =   120
  144.       Width           =   2412
  145.       Begin VB.CommandButton cmdNextFrame 
  146.          Caption         =   "&>>"
  147.          Enabled         =   0   'False
  148.          Height          =   372
  149.          Left            =   1320
  150.          TabIndex        =   3
  151.          Top             =   360
  152.          Width           =   852
  153.       End
  154.       Begin VB.CommandButton cmdPreviousFrame 
  155.          Caption         =   "&<<"
  156.          Enabled         =   0   'False
  157.          Height          =   372
  158.          Left            =   240
  159.          TabIndex        =   2
  160.          Top             =   360
  161.          Width           =   852
  162.       End
  163.    End
  164.    Begin ComctlLib.StatusBar StatusBar1 
  165.       Align           =   2  'Align Bottom
  166.       Height          =   408
  167.       Left            =   0
  168.       TabIndex        =   0
  169.       Top             =   2508
  170.       Width           =   5364
  171.       _Version        =   65536
  172.       _ExtentX        =   9462
  173.       _ExtentY        =   720
  174.       _StockProps     =   68
  175.       AlignSet        =   -1  'True
  176.       SimpleText      =   ""
  177.       NumPanels       =   3
  178.       i1              =   "ocxvb01.frx":030A
  179.       i2              =   "ocxvb01.frx":0416
  180.       i3              =   "ocxvb01.frx":0522
  181.    End
  182.    Begin MSComDlg.CommonDialog CommonDialog1 
  183.       Left            =   240
  184.       Top             =   5880
  185.       _Version        =   65536
  186.       _ExtentX        =   677
  187.       _ExtentY        =   677
  188.       _StockProps     =   0
  189.    End
  190.    Begin VB.Menu mnu_File 
  191.       Caption         =   "&File"
  192.       Begin VB.Menu mnu_File_Open 
  193.          Caption         =   "&Open"
  194.       End
  195.       Begin VB.Menu sep1 
  196.          Caption         =   "-"
  197.       End
  198.       Begin VB.Menu mnu_File_Run 
  199.          Caption         =   "&Run"
  200.       End
  201.       Begin VB.Menu mnu_File_Pause 
  202.          Caption         =   "&Pause"
  203.       End
  204.       Begin VB.Menu mnu_File_Stop 
  205.          Caption         =   "&Stop"
  206.       End
  207.       Begin VB.Menu sep2 
  208.          Caption         =   "-"
  209.       End
  210.       Begin VB.Menu mnu_File_Exit 
  211.          Caption         =   "E&xit"
  212.       End
  213.    End
  214.    Begin VB.Menu mnu_View 
  215.       Caption         =   "&View"
  216.       Begin VB.Menu mnu_View_DisplayPanel 
  217.          Caption         =   "&Display Panel"
  218.          Checked         =   -1  'True
  219.       End
  220.       Begin VB.Menu sep4 
  221.          Caption         =   "-"
  222.       End
  223.       Begin VB.Menu mnu_View_ControlPanel 
  224.          Caption         =   "&Control Panel"
  225.          Checked         =   -1  'True
  226.       End
  227.       Begin VB.Menu mnu_View_PositionControls 
  228.          Caption         =   "&Position Controls"
  229.          Checked         =   -1  'True
  230.       End
  231.       Begin VB.Menu mnu_View_SelectionControls 
  232.          Caption         =   "&Selection Controls"
  233.          Checked         =   -1  'True
  234.       End
  235.       Begin VB.Menu mnu_View_Tracker 
  236.          Caption         =   "&Tracker"
  237.          Checked         =   -1  'True
  238.       End
  239.    End
  240.    Begin VB.Menu mnu_Enable 
  241.       Caption         =   "E&nable"
  242.       Begin VB.Menu mnu_Enable_PositionControls 
  243.          Caption         =   "&Position Controls"
  244.          Checked         =   -1  'True
  245.       End
  246.       Begin VB.Menu mnu_Enable_SelectionControls 
  247.          Caption         =   "&Selection Controls"
  248.          Checked         =   -1  'True
  249.       End
  250.       Begin VB.Menu mnu_Enable_Tracker 
  251.          Caption         =   "&Tracker"
  252.          Checked         =   -1  'True
  253.       End
  254.    End
  255.    Begin VB.Menu mnu_Options 
  256.       Caption         =   "&Options"
  257.       Begin VB.Menu mnu_Options_AutoRewind 
  258.          Caption         =   "Auto &Rewind"
  259.          Checked         =   -1  'True
  260.       End
  261.       Begin VB.Menu mnu_Options_DisplayTime 
  262.          Caption         =   "Display &Time"
  263.          Checked         =   -1  'True
  264.       End
  265.    End
  266.    Begin VB.Menu mnu_events 
  267.       Caption         =   "&Events"
  268.       Begin VB.Menu mnu_Events_Keyboard 
  269.          Caption         =   "&Keyboard"
  270.          Checked         =   -1  'True
  271.       End
  272.       Begin VB.Menu mnu_Events_MouseClick 
  273.          Caption         =   "&Mouse Click"
  274.          Checked         =   -1  'True
  275.       End
  276.       Begin VB.Menu mnu_Events_MouseMove 
  277.          Caption         =   "Mouse Mo&ve"
  278.          Checked         =   -1  'True
  279.       End
  280.       Begin VB.Menu mnu_Events_PositionChange 
  281.          Caption         =   "&Position Change"
  282.          Checked         =   -1  'True
  283.       End
  284.       Begin VB.Menu mnu_Events_Timer 
  285.          Caption         =   "&Timer"
  286.          Checked         =   -1  'True
  287.       End
  288.       Begin VB.Menu mnu_events_state 
  289.          Caption         =   "&State Change"
  290.          Checked         =   -1  'True
  291.       End
  292.    End
  293. Attribute VB_Name = "frmMain"
  294. Attribute VB_Creatable = False
  295. Attribute VB_Exposed = False
  296. ' ActiveMovie Control Sample
  297. ' Copyright (c) 1996 Microsoft Corporation
  298. ' All Rights Reserved.
  299. Private Sub cmdNextFrame_Click()
  300.     frmViewer.ActiveMovie1.CurrentPosition = frmViewer.ActiveMovie1.CurrentPosition + 0.1
  301. End Sub
  302. Private Sub cmdPreviousFrame_Click()
  303.     frmViewer.ActiveMovie1.CurrentPosition = frmViewer.ActiveMovie1.CurrentPosition - 0.1
  304. End Sub
  305. Private Sub Form_Load()
  306.     ' ActiveMovie Control Sample Code
  307.     ' Copyright (c) 1996 Microsoft Corporation
  308.     ' All Rights Reserved
  309.     ' This sample demonstrates the ActiveMovie Control.
  310.     ' It contains the following controls:
  311.     '
  312.     '   The ActiveMovie control (in its own form).
  313.     '   A status bar control.
  314.     '   The common dialogs control.
  315.     '   Two buttons that allow you to step through the stream.
  316.     '   Option buttons that let you select the stream size.
  317.     '   A slider that lets you change the playback rate.
  318.     ' The main form, frmMain, contains several menus that
  319.     ' control various ActiveMovie controls.
  320.     ' When events are enabled, a global counter is used to
  321.     ' keep a running account of each ActiveMovie control event,
  322.     ' and the value is displayed in the status control.
  323.     ' Initialize control properties and set menu items to match.
  324.     Slider1.Value = 5   ' Right in the middle.
  325.     ' Default value for ActiveMovie1.Rate = 1.0
  326.     ' Use default value.
  327.     obDefault.Value = True
  328.     With frmViewer.ActiveMovie1
  329.         ' Display current position in time, rather than frames.
  330.         .DisplayMode = modeTime
  331.         mnu_Options_DisplayTime.Checked = True
  332.         
  333.         ' Show the display panel.
  334.         .ShowDisplay = True
  335.         mnu_View_DisplayPanel.Checked = True
  336.         
  337.         ' Show the control panel and all other controls.
  338.         .ShowControls = True
  339.         mnu_View_ControlPanel.Checked = True
  340.         .ShowPositionControls = False
  341.         mnu_View_PositionControls.Checked = False
  342.         .ShowSelectionControls = False
  343.         mnu_View_SelectionControls.Checked = False
  344.         .ShowTracker = True
  345.         mnu_View_Tracker.Checked = True
  346.         
  347.         ' Enable the sub-controls on the control panel.
  348.         .EnablePositionControls = False
  349.         mnu_Enable_PositionControls.Checked = False
  350.         .EnableSelectionControls = False
  351.         mnu_Enable_SelectionControls.Checked = False
  352.         .EnableTracker = False
  353.         mnu_Enable_Tracker.Checked = False
  354.         
  355.         ' Set AutoRewind.
  356.         .AutoRewind = True
  357.         mnu_Options_AutoRewind = True
  358.         
  359.         ' Set all event notification flags and check all menu items.
  360.         .EventNotification = eventError Or eventKeyboard Or eventMouseClick Or eventMouseMove Or eventPositionChange Or eventTimer Or eventStateChange
  361.         mnu_Events_Keyboard.Checked = True
  362.         mnu_Events_MouseClick.Checked = True
  363.         mnu_Events_MouseMove.Checked = True
  364.         mnu_Events_PositionChange.Checked = True
  365.         mnu_Events_Timer.Checked = True
  366.         mnu_events_state.Checked = True
  367.     End With
  368. End Sub
  369. Private Sub Form_Unload(Cancel As Integer)
  370.     End ' end program
  371. End Sub
  372. Private Sub mnu_Enable_PositionControls_Click()
  373.     ' Let the user change the prop value from the menu.
  374.     If (mnu_Enable_PositionControls.Checked) Then
  375.         mnu_Enable_PositionControls.Checked = False
  376.         frmViewer.ActiveMovie1.EnablePositionControls = False
  377.     Else
  378.         mnu_Enable_PositionControls.Checked = True
  379.         frmViewer.ActiveMovie1.EnablePositionControls = True
  380.     End If
  381. End Sub
  382. Private Sub mnu_Enable_SelectionControls_Click()
  383.     ' Let the user change the prop value from the menu.
  384.     If (mnu_Enable_SelectionControls.Checked) Then
  385.         mnu_Enable_SelectionControls.Checked = False
  386.         frmViewer.ActiveMovie1.EnableSelectionControls = False
  387.     Else
  388.         mnu_Enable_SelectionControls.Checked = True
  389.         frmViewer.ActiveMovie1.EnableSelectionControls = True
  390.     End If
  391. End Sub
  392. Private Sub mnu_Enable_Tracker_Click()
  393.     ' Let the user change the prop value from the menu.
  394.     If (mnu_Enable_Tracker.Checked) Then
  395.         mnu_Enable_Tracker.Checked = False
  396.         frmViewer.ActiveMovie1.EnableTracker = False
  397.     Else
  398.         mnu_Enable_Tracker.Checked = True
  399.         frmViewer.ActiveMovie1.EnableTracker = True
  400.     End If
  401. End Sub
  402. Private Sub mnu_Events_Error_Click()
  403.     ' Note: These events are not yet implemented in the OCX
  404. End Sub
  405. Private Sub mnu_Events_Keyboard_Click()
  406.     With frmViewer.ActiveMovie1
  407.         If (mnu_Events_Keyboard.Checked) Then
  408.             mnu_Events_Keyboard.Checked = False
  409.             .EventNotification = .EventNotification And (Not eventKeyboard)
  410.         Else
  411.             mnu_Events_Keyboard.Checked = True
  412.             .EventNotification = .EventNotification Or eventKeyboard
  413.         End If
  414.     End With
  415. End Sub
  416. Private Sub mnu_Events_MouseClick_Click()
  417.     With frmViewer.ActiveMovie1
  418.         If (mnu_Events_MouseClick.Checked) Then
  419.             mnu_Events_MouseClick.Checked = False
  420.             .EventNotification = .EventNotification And (Not eventMouseClick)
  421.         Else
  422.             mnu_Events_MouseClick.Checked = True
  423.             .EventNotification = .EventNotification Or eventMouseClick
  424.         End If
  425.     End With
  426. End Sub
  427. Private Sub mnu_Events_MouseMove_Click()
  428.     With frmViewer.ActiveMovie1
  429.         If (mnu_Events_MouseMove.Checked) Then
  430.             mnu_Events_MouseMove.Checked = False
  431.             .EventNotification = .EventNotification And (Not eventMouseMove)
  432.         Else
  433.             mnu_Events_MouseMove.Checked = True
  434.             .EventNotification = .EventNotification Or eventMouseMove
  435.         End If
  436.     End With
  437. End Sub
  438. Private Sub mnu_Events_PositionChange_Click()
  439.     With frmViewer.ActiveMovie1
  440.         If (mnu_Events_PositionChange.Checked) Then
  441.             mnu_Events_PositionChange.Checked = False
  442.             .EventNotification = .EventNotification And (Not eventPositionChange)
  443.         Else
  444.             mnu_Events_PositionChange.Checked = True
  445.             .EventNotification = .EventNotification Or eventPositionChange
  446.         End If
  447.     End With
  448. End Sub
  449. Private Sub mnu_events_state_Click()
  450.     With frmViewer.ActiveMovie1
  451.         If (mnu_Events_Keyboard.Checked) Then
  452.             mnu_Events_Keyboard.Checked = False
  453.             .EventNotification = .EventNotification And (Not eventStateChange)
  454.         Else
  455.             mnu_Events_Keyboard.Checked = True
  456.             .EventNotification = .EventNotification Or eventStateChange
  457.         End If
  458.     End With
  459. End Sub
  460. Private Sub mnu_Events_Timer_Click()
  461.     With frmViewer.ActiveMovie1
  462.         If (mnu_Events_Timer.Checked) Then
  463.             mnu_Events_Timer.Checked = False
  464.             .EventNotification = .EventNotification And (Not eventTimer)
  465.         Else
  466.             mnu_Events_Timer.Checked = True
  467.             .EventNotification = .EventNotification Or eventTimer
  468.         End If
  469.     End With
  470. End Sub
  471. Private Sub mnu_File_Exit_Click()
  472.     End ' End program.
  473. End Sub
  474. Private Sub mnu_File_Open_Click()
  475.     ' Opens an ActiveMovie file.
  476.     ' Displays Viewer form if successful.
  477.     On Error GoTo err_FileOpen
  478.     CommonDialog1.Filter = "All files (*.*)|*.*|ActiveMovie files (*.mpg;*.mpa;*.mpv;*.mov;*.mpeg;*.enc;*.m1v;*.mp2)|*.mpg;*.mpa;*.mpv;*.mov;*.mpeg;*.enc;*.m1v;*.mp2|ActiveMovie Streaming Format (*.asf)|*.asf|Audio files (.wav)|*.wav|Video for Windows files (.avi)|*.avi"
  479.     CommonDialog1.Flags = 4 'Hide read-only check box
  480.     CommonDialog1.ShowOpen
  481.     ' New file resets playback speed to 1.0
  482.     Slider1.Value = 5   ' right in the middle
  483.     ' Default value for ActiveMovie1.Rate = 1.0
  484.     ' If did not escape...
  485.     If CommonDialog1.filename <> "" Then
  486.         frmViewer.ActiveMovie1.filename = CommonDialog1.filename
  487.         g_FileOpened = True
  488.         g_FileExtension = Right$(CommonDialog1.filename, Len(CommonDialog1.filename) - InStr(CommonDialog1.filename, "."))
  489.     Else
  490.         GoTo err_FileOpen
  491.     End If
  492.     ' Resize the viewer window to match the image.
  493.     ResizeViewer
  494.     ' Reset controls and menu settings for new file.
  495.     With frmViewer.ActiveMovie1
  496.         .ShowPositionControls = False
  497.         mnu_View_PositionControls.Checked = False
  498.         .ShowSelectionControls = False
  499.         mnu_View_SelectionControls.Checked = False
  500.         .ShowTracker = True
  501.         mnu_View_Tracker.Checked = True
  502.         
  503.         ' Also, enable the sub-controls on the control panel
  504.         .EnablePositionControls = False
  505.         mnu_Enable_PositionControls.Checked = False
  506.         .EnableSelectionControls = False
  507.         mnu_Enable_SelectionControls.Checked = False
  508.         .EnableTracker = False
  509.         mnu_Enable_Tracker.Checked = False
  510.         
  511.         ' Enable change position buttons.
  512.         ' Can't use buttons for .asf files.
  513.         If g_FileExtension = "asf" Then
  514.             cmdPreviousFrame.Enabled = False
  515.             cmdNextFrame.Enabled = False
  516.         Else
  517.             cmdPreviousFrame.Enabled = True
  518.             cmdNextFrame.Enabled = True
  519.             ' Enable playback rate if avi file.
  520.             If g_FileExtension = "avi" Then
  521.                 Slider1.Enabled = True
  522.             End If
  523.         End If
  524.         
  525.         ' Enable frame image size panel.
  526.         frmImageSize.Enabled = True
  527.         
  528.     End With
  529.     Exit Sub
  530. err_FileOpen:
  531.     MsgBox "File open error.", 0, "ActiveMovie OCX Sample"
  532.     Exit Sub
  533. End Sub
  534. Private Sub mnu_File_Pause_Click()
  535.     ' Pauses the current file.
  536.     If g_FileOpened = True Then
  537.         frmViewer.ActiveMovie1.Pause
  538.     End If
  539. End Sub
  540. Private Sub mnu_File_Run_Click()
  541.     ' Starts playing the current file.
  542.     If g_FileOpened = True Then
  543.         frmViewer.ActiveMovie1.Run
  544.         frmViewer.ZOrder 0
  545.     End If
  546. End Sub
  547. Private Sub mnu_File_Stop_Click()
  548.     ' Stops file play.
  549.     If g_FileOpened = True Then
  550.         frmViewer.ActiveMovie1.Stop
  551.     End If
  552. End Sub
  553. Private Sub mnu_Options_AutoRewind_Click()
  554.     ' Toggles the AutoRewind property.
  555.     If (mnu_Options_AutoRewind.Checked) Then
  556.         frmViewer.ActiveMovie1.AutoRewind = False
  557.         mnu_Options_AutoRewind.Checked = False
  558.     Else
  559.         frmViewer.ActiveMovie1.AutoRewind = True
  560.         mnu_Options_AutoRewind.Checked = True
  561.     End If
  562. End Sub
  563. Private Sub mnu_Options_DisplayTime_Click()
  564.     ' Toggles the DisplayMode between time and frames.
  565.     With frmViewer.ActiveMovie1
  566.         If (.DisplayMode = modeTime) Then
  567.             .DisplayMode = modeFrames
  568.             mnu_Options_DisplayTime.Checked = False
  569.         Else
  570.             .DisplayMode = modeTime
  571.             mnu_Options_DisplayTime.Checked = True
  572.         End If
  573.     End With
  574. End Sub
  575. Private Sub mnu_View_ControlPanel_Click()
  576.     ' Toggles the ShowControls property.
  577.     With frmViewer.ActiveMovie1
  578.         If (.AllowHideControls) Then
  579.             If (.ShowControls) Then
  580.                 .ShowControls = False
  581.             Else
  582.                 .ShowControls = True
  583.             End If
  584.             ' Toggle menu check mark.
  585.             mnu_View_ControlPanel.Checked = Not mnu_View_ControlPanel.Checked
  586.         End If
  587.     End With
  588.     ResizeViewer
  589. End Sub
  590. Private Sub mnu_View_DisplayPanel_Click()
  591.     ' Toggles ShowDisplay property.
  592.     With frmViewer.ActiveMovie1
  593.         If (.AllowHideDisplay) Then
  594.             If (.ShowDisplay) Then
  595.                 .ShowDisplay = False
  596.             Else
  597.                 .ShowDisplay = True
  598.             End If
  599.             ' Toggle menu check mark.
  600.             mnu_View_DisplayPanel.Checked = Not mnu_View_DisplayPanel.Checked
  601.         End If
  602.     End With
  603.     ResizeViewer
  604. End Sub
  605. Private Sub mnu_View_PositionControls_Click()
  606.     ' Toggles ShowPositionControls property.
  607.     frmViewer.ActiveMovie1.ShowPositionControls = Not frmViewer.ActiveMovie1.ShowPositionControls
  608.     mnu_View_PositionControls.Checked = Not mnu_View_PositionControls.Checked
  609.     ResizeViewer
  610. End Sub
  611. Private Sub mnu_View_SelectionControls_Click()
  612.     ' Toggles ShowSelectionControls property.
  613.     frmViewer.ActiveMovie1.ShowSelectionControls = Not frmViewer.ActiveMovie1.ShowSelectionControls
  614.     mnu_View_SelectionControls.Checked = Not mnu_View_SelectionControls.Checked
  615.     ResizeViewer
  616. End Sub
  617. Private Sub mnu_View_Tracker_Click()
  618.     ' Toggles ShowTracker property.
  619.     frmViewer.ActiveMovie1.ShowTracker = Not frmViewer.ActiveMovie1.ShowTracker
  620.     mnu_View_Tracker.Checked = Not mnu_View_Tracker.Checked
  621.     ResizeViewer
  622. End Sub
  623. Private Sub obDefault_Click()
  624.     ' Set image size to default.
  625.     If g_FileOpened = True Then
  626.         frmViewer.ActiveMovie1.MovieWindowSetting = movieDefaultSize
  627.         Call ResizeViewer
  628.     End If
  629. End Sub
  630. Private Sub obDouble_Click()
  631.     ' Set image size to double.
  632.     If g_FileOpened = True Then
  633.         frmViewer.ActiveMovie1.MovieWindowSetting = movieDoubleSize
  634.         Call ResizeViewer
  635.     End If
  636. End Sub
  637. Private Sub obFixedAspectRatio_Click()
  638.     ' Set MovieWindowSetting to permit resizing while maintaing aspect ratio.
  639.     If g_FileOpened = True Then
  640.         frmViewer.ActiveMovie1.MovieWindowSetting = moviePermitResizeWithAspect
  641.         Call ResizeViewer
  642.     End If
  643. End Sub
  644. Private Sub obFullScreen_Click()
  645.     ' Set image size to full screen.
  646.     If g_FileOpened = True Then
  647.         frmViewer.ActiveMovie1.MovieWindowSetting = movieFullScreen
  648.         Call ResizeViewer
  649.     End If
  650. End Sub
  651. Private Sub obHalf_Click()
  652.     ' Set image size to half.
  653.     If g_FileOpened = True Then
  654.         frmViewer.ActiveMovie1.MovieWindowSetting = movieHalfSize
  655.         Call ResizeViewer
  656.     End If
  657. End Sub
  658. Private Sub obMaximize_Click()
  659.     ' Set image size to maximize.
  660.     If g_FileOpened = True Then
  661.         frmViewer.ActiveMovie1.MovieWindowSetting = movieMaximizeSize
  662.         Call ResizeViewer
  663.     End If
  664. End Sub
  665. Private Sub obNoRestrictions_Click()
  666.     ' Allow image to be sized without restriction.
  667.     If g_FileOpened = True Then
  668.         frmViewer.ActiveMovie1.MovieWindowSetting = moviePermitResizeNoRestrict
  669.         Call ResizeViewer
  670.     End If
  671. End Sub
  672. Private Sub Slider1_Change()
  673.     ' Set playback rate.
  674.     ' 10 settings, each setting = 0.1
  675.     If g_FileOpened = True Then
  676.         frmViewer.ActiveMovie1.Rate = 0.5 + (0.1 * Slider1.Value)
  677.     End If
  678. End Sub
  679.