home *** CD-ROM | disk | FTP | other *** search
/ Isometric Game Programming with DirectX 7.0 / Isometric Game Programming.iso / directx / dxf / samples / multimedia / vbsamples / directshow / editing / dextervb / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-09-22  |  249.3 KB  |  5,203 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Object = "{38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0"; "COMCT332.OCX"
  5. Begin VB.Form frmMain 
  6.    Caption         =   "DexterVB"
  7.    ClientHeight    =   5565
  8.    ClientLeft      =   60
  9.    ClientTop       =   645
  10.    ClientWidth     =   8640
  11.    Icon            =   "frmMain.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    ScaleHeight     =   5565
  15.    ScaleWidth      =   8640
  16.    WhatsThisButton =   -1  'True
  17.    WhatsThisHelp   =   -1  'True
  18.    Begin ComCtl3.CoolBar ctrlCoolBar 
  19.       Height          =   405
  20.       Left            =   0
  21.       TabIndex        =   3
  22.       Top             =   0
  23.       Width           =   8580
  24.       _ExtentX        =   15134
  25.       _ExtentY        =   714
  26.       BandCount       =   2
  27.       FixedOrder      =   -1  'True
  28.       VariantHeight   =   0   'False
  29.       OLEDropMode     =   1
  30.       _CBWidth        =   8580
  31.       _CBHeight       =   405
  32.       _Version        =   "6.7.8862"
  33.       MinHeight1      =   345
  34.       NewRow1         =   0   'False
  35.       Child2          =   "tbMain"
  36.       MinHeight2      =   315
  37.       Width2          =   5730
  38.       NewRow2         =   0   'False
  39.       AllowVertical2  =   0   'False
  40.       Begin MSComctlLib.Toolbar tbMain 
  41.          Height          =   315
  42.          Left            =   195
  43.          TabIndex        =   4
  44.          Top             =   45
  45.          Width           =   8295
  46.          _ExtentX        =   14631
  47.          _ExtentY        =   556
  48.          ButtonWidth     =   609
  49.          ButtonHeight    =   556
  50.          Wrappable       =   0   'False
  51.          Style           =   1
  52.          ImageList       =   "ctrlImageList"
  53.          DisabledImageList=   "ctrlImageList"
  54.          HotImageList    =   "ctrlImageList"
  55.          _Version        =   393216
  56.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  57.             NumButtons      =   11
  58.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  59.                Key             =   "New"
  60.                Description     =   "New TimeLine"
  61.                Object.ToolTipText     =   "Create A New Timeline"
  62.                ImageIndex      =   1
  63.             EndProperty
  64.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  65.                Key             =   "Open"
  66.                Description     =   "Open Timeline"
  67.                Object.ToolTipText     =   "Open An Existing Timeline File"
  68.                ImageIndex      =   2
  69.             EndProperty
  70.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  71.                Key             =   "Save"
  72.                Description     =   "Save Timeline"
  73.                Object.ToolTipText     =   "Export The Timeline"
  74.                ImageIndex      =   3
  75.             EndProperty
  76.             BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  77.                Style           =   3
  78.             EndProperty
  79.             BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  80.                Key             =   "Rewind"
  81.                Description     =   "btnRewind"
  82.                Object.ToolTipText     =   "Rewind To Beginning Of TimeLine"
  83.                ImageIndex      =   4
  84.             EndProperty
  85.             BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  86.                Key             =   "SeekBackward"
  87.                Description     =   "btnSeekBack"
  88.                Object.ToolTipText     =   "Seek Backwards One Second At A Time"
  89.                ImageIndex      =   5
  90.             EndProperty
  91.             BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  92.                Key             =   "Play"
  93.                Description     =   "Play"
  94.                Object.ToolTipText     =   "Play Currently Loaded Timeline"
  95.                ImageIndex      =   6
  96.             EndProperty
  97.             BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  98.                Key             =   "Pause"
  99.                Description     =   "Pause"
  100.                Object.ToolTipText     =   "Pauses Playback"
  101.                ImageIndex      =   7
  102.             EndProperty
  103.             BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  104.                Key             =   "Stop"
  105.                Description     =   "Stop"
  106.                Object.ToolTipText     =   "Stops Playback"
  107.                ImageIndex      =   8
  108.             EndProperty
  109.             BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  110.                Key             =   "SeekForward"
  111.                Description     =   "btnSeekFwd"
  112.                Object.ToolTipText     =   "Seek Forward One Second At A Time"
  113.                ImageIndex      =   9
  114.             EndProperty
  115.             BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  116.                Key             =   "FastForward"
  117.                Description     =   "btnffwd"
  118.                Object.ToolTipText     =   "Go To End Of TimeLine"
  119.                ImageIndex      =   10
  120.             EndProperty
  121.          EndProperty
  122.          OLEDropMode     =   1
  123.       End
  124.    End
  125.    Begin MSComctlLib.ListView lstViewInfo 
  126.       Height          =   4770
  127.       Left            =   2475
  128.       TabIndex        =   2
  129.       Top             =   450
  130.       Width           =   6120
  131.       _ExtentX        =   10795
  132.       _ExtentY        =   8414
  133.       View            =   3
  134.       LabelWrap       =   -1  'True
  135.       HideSelection   =   -1  'True
  136.       OLEDropMode     =   1
  137.       FlatScrollBar   =   -1  'True
  138.       FullRowSelect   =   -1  'True
  139.       HotTracking     =   -1  'True
  140.       HoverSelection  =   -1  'True
  141.       _Version        =   393217
  142.       ForeColor       =   -2147483640
  143.       BackColor       =   -2147483643
  144.       Appearance      =   1
  145.       OLEDropMode     =   1
  146.       NumItems        =   0
  147.    End
  148.    Begin MSComctlLib.TreeView tvwSimpleTree 
  149.       Height          =   4815
  150.       Left            =   0
  151.       TabIndex        =   1
  152.       Top             =   375
  153.       Width           =   2415
  154.       _ExtentX        =   4260
  155.       _ExtentY        =   8493
  156.       _Version        =   393217
  157.       HideSelection   =   0   'False
  158.       Style           =   7
  159.       FullRowSelect   =   -1  'True
  160.       HotTracking     =   -1  'True
  161.       ImageList       =   "ctrlImageList2"
  162.       Appearance      =   1
  163.       OLEDropMode     =   1
  164.    End
  165.    Begin MSComctlLib.ImageList ctrlImageList 
  166.       Left            =   8625
  167.       Top             =   450
  168.       _ExtentX        =   1005
  169.       _ExtentY        =   1005
  170.       BackColor       =   -2147483643
  171.       ImageWidth      =   16
  172.       ImageHeight     =   15
  173.       MaskColor       =   12632256
  174.       _Version        =   393216
  175.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  176.          NumListImages   =   24
  177.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  178.             Picture         =   "frmMain.frx":030A
  179.             Key             =   ""
  180.          EndProperty
  181.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  182.             Picture         =   "frmMain.frx":062E
  183.             Key             =   ""
  184.          EndProperty
  185.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  186.             Picture         =   "frmMain.frx":0952
  187.             Key             =   ""
  188.          EndProperty
  189.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  190.             Picture         =   "frmMain.frx":0C76
  191.             Key             =   ""
  192.          EndProperty
  193.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  194.             Picture         =   "frmMain.frx":0F6A
  195.             Key             =   ""
  196.          EndProperty
  197.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  198.             Picture         =   "frmMain.frx":125E
  199.             Key             =   ""
  200.          EndProperty
  201.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  202.             Picture         =   "frmMain.frx":1552
  203.             Key             =   ""
  204.          EndProperty
  205.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  206.             Picture         =   "frmMain.frx":1846
  207.             Key             =   ""
  208.          EndProperty
  209.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  210.             Picture         =   "frmMain.frx":1B3A
  211.             Key             =   ""
  212.          EndProperty
  213.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  214.             Picture         =   "frmMain.frx":1E2E
  215.             Key             =   ""
  216.          EndProperty
  217.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  218.             Picture         =   "frmMain.frx":2122
  219.             Key             =   ""
  220.          EndProperty
  221.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  222.             Picture         =   "frmMain.frx":2416
  223.             Key             =   ""
  224.          EndProperty
  225.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  226.             Picture         =   "frmMain.frx":270A
  227.             Key             =   ""
  228.          EndProperty
  229.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  230.             Picture         =   "frmMain.frx":29FE
  231.             Key             =   ""
  232.          EndProperty
  233.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  234.             Picture         =   "frmMain.frx":2CF2
  235.             Key             =   ""
  236.          EndProperty
  237.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  238.             Picture         =   "frmMain.frx":2FE6
  239.             Key             =   ""
  240.          EndProperty
  241.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  242.             Picture         =   "frmMain.frx":32DA
  243.             Key             =   ""
  244.          EndProperty
  245.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  246.             Picture         =   "frmMain.frx":35CE
  247.             Key             =   ""
  248.          EndProperty
  249.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  250.             Picture         =   "frmMain.frx":38C2
  251.             Key             =   ""
  252.          EndProperty
  253.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  254.             Picture         =   "frmMain.frx":3BB6
  255.             Key             =   ""
  256.          EndProperty
  257.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  258.             Picture         =   "frmMain.frx":3EAA
  259.             Key             =   ""
  260.          EndProperty
  261.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  262.             Picture         =   "frmMain.frx":419E
  263.             Key             =   ""
  264.          EndProperty
  265.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  266.             Picture         =   "frmMain.frx":4492
  267.             Key             =   ""
  268.          EndProperty
  269.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  270.             Picture         =   "frmMain.frx":4786
  271.             Key             =   ""
  272.          EndProperty
  273.       EndProperty
  274.    End
  275.    Begin MSComctlLib.StatusBar sbStatus 
  276.       Align           =   2  'Align Bottom
  277.       Height          =   345
  278.       Left            =   0
  279.       TabIndex        =   0
  280.       Top             =   5220
  281.       Width           =   8640
  282.       _ExtentX        =   15240
  283.       _ExtentY        =   609
  284.       Style           =   1
  285.       _Version        =   393216
  286.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  287.       EndProperty
  288.       OLEDropMode     =   1
  289.    End
  290.    Begin MSComDlg.CommonDialog dlgCommonDialog 
  291.       Left            =   8625
  292.       Top             =   0
  293.       _ExtentX        =   847
  294.       _ExtentY        =   847
  295.       _Version        =   393216
  296.    End
  297.    Begin MSComctlLib.ImageList ctrlImageList2 
  298.       Left            =   8625
  299.       Top             =   1050
  300.       _ExtentX        =   1005
  301.       _ExtentY        =   1005
  302.       BackColor       =   -2147483643
  303.       ImageWidth      =   16
  304.       ImageHeight     =   16
  305.       MaskColor       =   12632256
  306.       _Version        =   393216
  307.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  308.          NumListImages   =   3
  309.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  310.             Picture         =   "frmMain.frx":4A7A
  311.             Key             =   ""
  312.          EndProperty
  313.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  314.             Picture         =   "frmMain.frx":4D94
  315.             Key             =   ""
  316.          EndProperty
  317.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  318.             Picture         =   "frmMain.frx":50AE
  319.             Key             =   ""
  320.          EndProperty
  321.       EndProperty
  322.    End
  323.    Begin VB.Menu mnuFile 
  324.       Caption         =   "&File"
  325.       NegotiatePosition=   1  'Left
  326.       Begin VB.Menu mnuFileNew 
  327.          Caption         =   "&New"
  328.       End
  329.       Begin VB.Menu mnuFileOpen 
  330.          Caption         =   "&Open"
  331.       End
  332.       Begin VB.Menu mnuFileSaveAs 
  333.          Caption         =   "Save &As"
  334.       End
  335.       Begin VB.Menu mnuFileExit 
  336.          Caption         =   "&Exit"
  337.       End
  338.    End
  339.    Begin VB.Menu mnuTimeline 
  340.       Caption         =   "TimeLine"
  341.       Visible         =   0   'False
  342.       Begin VB.Menu mnuTimeLinePlay 
  343.          Caption         =   "Play"
  344.       End
  345.       Begin VB.Menu mnuTimeLineStop 
  346.          Caption         =   "Stop"
  347.       End
  348.       Begin VB.Menu mnuTimeLinePause 
  349.          Caption         =   "Pause"
  350.       End
  351.       Begin VB.Menu mnuTimelineSeptum 
  352.          Caption         =   "-"
  353.       End
  354.       Begin VB.Menu mnuTimelineExpand 
  355.          Caption         =   "Expand"
  356.       End
  357.       Begin VB.Menu mnuTimelineCollapse 
  358.          Caption         =   "Collapse"
  359.       End
  360.       Begin VB.Menu mnuTimelineSeptum2 
  361.          Caption         =   "-"
  362.       End
  363.       Begin VB.Menu mnuTimeLineEdit 
  364.          Caption         =   "Edit"
  365.       End
  366.       Begin VB.Menu mnuTimeLineInsertGroup 
  367.          Caption         =   "Insert Group"
  368.       End
  369.       Begin VB.Menu mnuTimelineSeptum3 
  370.          Caption         =   "-"
  371.       End
  372.       Begin VB.Menu mnuTimeLineRenderTimeLine 
  373.          Caption         =   "Render Timeline"
  374.       End
  375.       Begin VB.Menu mnuTimeLineClearRenderEngine 
  376.          Caption         =   "ClearRenderEngine"
  377.       End
  378.    End
  379.    Begin VB.Menu mnuTrack 
  380.       Caption         =   "Track"
  381.       Visible         =   0   'False
  382.       Begin VB.Menu mnuTrackEdit 
  383.          Caption         =   "Edit"
  384.       End
  385.       Begin VB.Menu mnuTrackDelete 
  386.          Caption         =   "Delete"
  387.       End
  388.       Begin VB.Menu mnuTrackSeptum 
  389.          Caption         =   "-"
  390.       End
  391.       Begin VB.Menu mnuTrackExpand 
  392.          Caption         =   "Expand"
  393.       End
  394.       Begin VB.Menu mnuTrackCollapse 
  395.          Caption         =   "Collapse"
  396.       End
  397.       Begin VB.Menu mnuTrackSeptum2 
  398.          Caption         =   "-"
  399.       End
  400.       Begin VB.Menu mnuTrackAddClip 
  401.          Caption         =   "Add Clip"
  402.       End
  403.       Begin VB.Menu mnuTrackAddEffect 
  404.          Caption         =   "Add Effect"
  405.       End
  406.       Begin VB.Menu mnuTrackAddTransition 
  407.          Caption         =   "Add Transition"
  408.       End
  409.    End
  410.    Begin VB.Menu mnuGroup 
  411.       Caption         =   "group"
  412.       Visible         =   0   'False
  413.       Begin VB.Menu mnuGroupEdit 
  414.          Caption         =   "Edit"
  415.       End
  416.       Begin VB.Menu mnuGroupDelete 
  417.          Caption         =   "Delete"
  418.       End
  419.       Begin VB.Menu mnuGroupSeptum 
  420.          Caption         =   "-"
  421.       End
  422.       Begin VB.Menu mnuGroupExpand 
  423.          Caption         =   "Expand"
  424.       End
  425.       Begin VB.Menu mnuGroupCollapse 
  426.          Caption         =   "Collapse"
  427.       End
  428.       Begin VB.Menu mnuGroupSeptum2 
  429.          Caption         =   "-"
  430.       End
  431.       Begin VB.Menu mnuGroupAddComp 
  432.          Caption         =   "Add Composition"
  433.       End
  434.       Begin VB.Menu mnuGroupAddTrack 
  435.          Caption         =   "Add Track"
  436.       End
  437.       Begin VB.Menu mnuGroupAddTransition 
  438.          Caption         =   "Add Transition"
  439.       End
  440.       Begin VB.Menu mnuGroupAddEffect 
  441.          Caption         =   "Add Effect"
  442.       End
  443.    End
  444.    Begin VB.Menu mnuComp 
  445.       Caption         =   "Comp"
  446.       Visible         =   0   'False
  447.       Begin VB.Menu mnuCompEdit 
  448.          Caption         =   "Edit"
  449.       End
  450.       Begin VB.Menu mnuCompDelete 
  451.          Caption         =   "Delete"
  452.       End
  453.       Begin VB.Menu mnuCompSeptum 
  454.          Caption         =   "-"
  455.       End
  456.       Begin VB.Menu mnuCompExpand 
  457.          Caption         =   "Expand"
  458.       End
  459.       Begin VB.Menu mnuCompCollapse 
  460.          Caption         =   "Collapse"
  461.       End
  462.       Begin VB.Menu mnuCompSeptum2 
  463.          Caption         =   "-"
  464.       End
  465.       Begin VB.Menu mnuCompAddTrack 
  466.          Caption         =   "Add Track"
  467.       End
  468.       Begin VB.Menu mnuCompAddEffect 
  469.          Caption         =   "Add Effect"
  470.       End
  471.       Begin VB.Menu mnuCompAddTransition 
  472.          Caption         =   "Add Transition"
  473.       End
  474.       Begin VB.Menu mnuCompAddComp 
  475.          Caption         =   "Add Composition"
  476.       End
  477.    End
  478.    Begin VB.Menu mnuClip 
  479.       Caption         =   "Clip"
  480.       Visible         =   0   'False
  481.       Begin VB.Menu mnuClipEdit 
  482.          Caption         =   "Edit"
  483.       End
  484.       Begin VB.Menu mnuClipDelete 
  485.          Caption         =   "Delete"
  486.       End
  487.       Begin VB.Menu mnuClipSeptum 
  488.          Caption         =   "-"
  489.       End
  490.       Begin VB.Menu mnuClipExpand 
  491.          Caption         =   "Expand"
  492.       End
  493.       Begin VB.Menu mnuClipCollapse 
  494.          Caption         =   "Collapse"
  495.       End
  496.    End
  497.    Begin VB.Menu mnuTrans 
  498.       Caption         =   "Trans"
  499.       Visible         =   0   'False
  500.       Begin VB.Menu mnuTransEdit 
  501.          Caption         =   "Edit"
  502.       End
  503.       Begin VB.Menu mnuTransDelete 
  504.          Caption         =   "Delete"
  505.       End
  506.       Begin VB.Menu mnuTransSeptum 
  507.          Caption         =   "-"
  508.       End
  509.       Begin VB.Menu mnuTransExpand 
  510.          Caption         =   "Expand"
  511.       End
  512.       Begin VB.Menu mnuTransCollapse 
  513.          Caption         =   "Collapse"
  514.       End
  515.    End
  516.    Begin VB.Menu mnuEffect 
  517.       Caption         =   "Effect"
  518.       Visible         =   0   'False
  519.       Begin VB.Menu mnuEffectEdit 
  520.          Caption         =   "Edit"
  521.       End
  522.       Begin VB.Menu mnuEffectDelete 
  523.          Caption         =   "Delete"
  524.       End
  525.       Begin VB.Menu mnuEffectSeptum 
  526.          Caption         =   "-"
  527.       End
  528.       Begin VB.Menu mnuEffectExpand 
  529.          Caption         =   "Expand"
  530.       End
  531.       Begin VB.Menu mnuEffectCollapse 
  532.          Caption         =   "Collapse"
  533.       End
  534.    End
  535.    Begin VB.Menu mnuHelp 
  536.       Caption         =   "&Help"
  537.       NegotiatePosition=   3  'Right
  538.       Begin VB.Menu mnuHelpAbout 
  539.          Caption         =   "&About"
  540.       End
  541.    End
  542. Attribute VB_Name = "frmMain"
  543. Attribute VB_GlobalNameSpace = False
  544. Attribute VB_Creatable = False
  545. Attribute VB_PredeclaredId = True
  546. Attribute VB_Exposed = False
  547. '*******************************************************************************
  548. '*       This is a part of the Microsoft DXSDK Code Samples.
  549. '*       Copyright (C) 1999-2000 Microsoft Corporation.
  550. '*       All rights reserved.
  551. '*       This source code is only intended as a supplement to
  552. '*       Microsoft Development Tools and/or SDK documentation.
  553. '*       See these sources for detailed information regarding the
  554. '*       Microsoft samples programs.
  555. '*******************************************************************************
  556. Option Explicit
  557. Option Base 0
  558. Option Compare Text
  559. 'module-level drag indicator
  560. Private m_boolDrag As Boolean                    'returns true if the user is moving the ide septum
  561. ' **************************************************************************************************************************************
  562. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  563.             ' ******************************************************************************************************************************
  564.             ' * procedure name: Form_Activate
  565.             ' * procedure description:  Occurs when a form becomes the active window.
  566.             ' *
  567.             ' ******************************************************************************************************************************
  568.             Private Sub Form_Activate()
  569.             On Local Error GoTo ErrLine
  570.             Call AppActivate(App.Title, 0)
  571.             Exit Sub
  572.             
  573. ErrLine:
  574.             Err.Clear
  575.             Exit Sub
  576.             End Sub
  577.             
  578.             
  579.             ' ******************************************************************************************************************************
  580.             ' * procedure name: Form_GotFocus
  581.             ' * procedure description:  Occurs when an object receives the focus.
  582.             ' *
  583.             ' ******************************************************************************************************************************
  584.             Private Sub Form_GotFocus()
  585.             On Local Error GoTo ErrLine
  586.             
  587.             'set focus to the treeview
  588.             tvwSimpleTree.SetFocus
  589.             
  590.             'if a node has not been selected set the selected node to root
  591.             If tvwSimpleTree.Nodes.Count > 0 Then
  592.                If ObjPtr(tvwSimpleTree.SelectedItem) = 0 Then _
  593.                   Set tvwSimpleTree.SelectedItem = tvwSimpleTree.Nodes(1)
  594.             End If
  595.             Exit Sub
  596.             
  597. ErrLine:
  598.             Err.Clear
  599.             Exit Sub
  600.             End Sub
  601.             
  602.             
  603.             ' ******************************************************************************************************************************
  604.             ' * procedure name: Form_Initialize
  605.             ' * procedure description:  Occurs when an application creates an instance of a Form, MDIForm, or class.
  606.             ' *
  607.             ' ******************************************************************************************************************************
  608.             Private Sub Form_Initialize()
  609.             On Local Error GoTo ErrLine
  610.             
  611.             'initalize module-level variable(s)
  612.             Set gbl_colNormalEnum = New Collection
  613.             Set gbl_objQuartzVB = New VBQuartzHelper
  614.             Exit Sub
  615.             
  616. ErrLine:
  617.             Err.Clear
  618.             Exit Sub
  619.             End Sub
  620.             
  621.             
  622.             ' ******************************************************************************************************************************
  623.             ' * procedure name: Form_Load
  624.             ' * procedure description:  Occurs when a form is loaded.
  625.             ' *
  626.             ' ******************************************************************************************************************************
  627.             Private Sub Form_Load()
  628.             On Local Error GoTo ErrLine
  629.             
  630.             If ControlAvailable("lstViewInfo") Then
  631.               'set the listview to report view
  632.                lstViewInfo.View = lvwReport
  633.                lstViewInfo.ColumnHeaders.Add , "Parameter", "Parameter", (lstViewInfo.Width / 2) - 50
  634.                lstViewInfo.ColumnHeaders.Add , "Value", "Value", (lstViewInfo.Width / 2) - 50
  635.                If lstViewInfo.ColumnHeaders.Count > 0 Then
  636.                      lstViewInfo.ColumnHeaders(1).Width = lstViewInfo.Width * 0.2
  637.                      If lstViewInfo.ColumnHeaders(2).Width <> (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width) Then _
  638.                         lstViewInfo.ColumnHeaders(2).Width = (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width)
  639.                End If
  640.                'ensure the listview has zero items
  641.                 If lstViewInfo.ListItems.Count <> 0 Then
  642.                    lstViewInfo.ListItems.Clear
  643.                 End If
  644.             End If
  645.             
  646.             If ControlAvailable("sbStatus") Then
  647.                'update the text on the statusbar
  648.                sbStatus.SimpleText = "Ready"
  649.             End If
  650.            
  651.            If Command = vbNullString Then
  652.               'update the button(s)
  653.                With tbMain.Buttons
  654.                   .Item("Play").Image = 20
  655.                   .Item("Pause").Image = 21
  656.                   .Item("Stop").Image = 22
  657.                   .Item("Rewind").Image = 18
  658.                   .Item("FastForward").Image = 24
  659.                   .Item("SeekForward").Image = 23
  660.                   .Item("SeekBackward").Image = 19
  661.                   .Item("Play").Enabled = False
  662.                   .Item("Pause").Enabled = False
  663.                   .Item("Stop").Enabled = False
  664.                   .Item("Rewind").Enabled = False
  665.                   .Item("FastForward").Enabled = False
  666.                   .Item("SeekForward").Enabled = False
  667.                   .Item("SeekBackward").Enabled = False
  668.                End With
  669.                'update the state on the popup context menu
  670.                mnuTimeLinePlay.Enabled = True
  671.                mnuTimeLineStop.Enabled = False
  672.                mnuTimeLinePause.Enabled = False
  673.                mnuTimeLineRenderTimeLine.Enabled = True
  674.                mnuTimeLineClearRenderEngine.Enabled = True
  675.             End If
  676.             Exit Sub
  677.             
  678. ErrLine:
  679.             Err.Clear
  680.             Exit Sub
  681.             End Sub
  682.             
  683.             
  684.             ' ******************************************************************************************************************************
  685.             ' * procedure name: Form_MouseDown
  686.             ' * procedure description:  Occurs when the user presses the mouse button while an object has the focus.
  687.             ' *
  688.             ' ******************************************************************************************************************************
  689.             Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  690.             On Local Error GoTo ErrLine
  691.             
  692.             'check if we are in the septum
  693.             If X > Me.Controls("tvwSimpleTree").Width And X < Me.Controls("lstViewInfo").Left Then
  694.                If Y > Me.Controls("tbMain").Height And Y < Me.Controls("sbStatus").Top Then
  695.                   'we are hovering over the septum bar..
  696.                   If Button = 1 Then
  697.                      m_boolDrag = True
  698.                      If Me.BackColor <> vbBlack Then Me.BackColor = vbBlack
  699.                   End If
  700.                   Exit Sub
  701.                End If
  702.             End If
  703.             Exit Sub
  704.             
  705. ErrLine:
  706.             Err.Clear
  707.             Exit Sub
  708.             End Sub
  709.             
  710.             
  711.             ' ******************************************************************************************************************************
  712.             ' * procedure name: Form_MouseMove
  713.             ' * procedure description:  Occurs when the user moves the mouse.
  714.             ' *
  715.             ' ******************************************************************************************************************************
  716.             Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  717.             On Local Error GoTo ErrLine
  718.             
  719.             'check if we are in the septum; and proceed to set the mousepointer
  720.             If X > Me.Controls("tvwSimpleTree").Width And X < Me.Controls("lstViewInfo").Left Then
  721.                If Y > Me.Controls("tbMain").Height And Y < Me.Controls("sbStatus").Top Then
  722.                   'we are hovering over the septum bar..
  723.                   Me.MousePointer = 9
  724.                Else
  725.                   'otherwise reset
  726.                   Me.MousePointer = vbDefault
  727.                   Me.BackColor = &H8000000F
  728.                End If
  729.             End If
  730.             
  731.             'if we are in 'drag mode' then resize the control(s)
  732.             If m_boolDrag = True And Button = 1 Then
  733.                If X > 65 And X < Me.ScaleWidth - 65 Then Me.Controls("tvwSimpleTree").Width = X
  734.                Call Form_Resize
  735.             End If
  736.             Exit Sub
  737.             
  738. ErrLine:
  739.             Err.Clear
  740.             Exit Sub
  741.             End Sub
  742.             
  743.             
  744.             ' ******************************************************************************************************************************
  745.             ' * procedure name: Form_MouseUp
  746.             ' * procedure description:  Occurs when the user releases the mouse button while an object has the focus.
  747.             ' *
  748.             ' ******************************************************************************************************************************
  749.             Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  750.             On Local Error GoTo ErrLine
  751.             
  752.             'check if we are in the septum
  753.             If X > Me.Controls("tvwSimpleTree").Width And X < Me.Controls("lstViewInfo").Left Then
  754.                If Y > Me.Controls("tbMain").Height And Y < Me.Controls("sbStatus").Top Then
  755.                   'we are hovering over the septum bar..
  756.                   If Button = 1 Then
  757.                      m_boolDrag = False
  758.                      If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  759.                   End If
  760.                   Exit Sub
  761.                End If
  762.             Else
  763.                'reset the mousepointer & septum color
  764.                If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  765.                If Me.MousePointer <> vbDefault Then Me.MousePointer = vbDefault
  766.             End If
  767.             Exit Sub
  768.             
  769. ErrLine:
  770.             Err.Clear
  771.             Exit Sub
  772.             End Sub
  773.             
  774.             
  775.             ' ******************************************************************************************************************************
  776.             ' * procedure name: Form_OLEDragDrop
  777.             ' * procedure description:   Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  778.             ' *
  779.             ' ******************************************************************************************************************************
  780.             Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  781.             Dim nCount As Long
  782.             Dim bstrFileName As String
  783.             Dim objLocalTimeline As AMTimeline
  784.             On Local Error GoTo ErrLine
  785.             
  786.             For nCount = 1 To Data.Files.Count
  787.                   bstrFileName = Data.Files(nCount)
  788.                   If Len(bstrFileName) > 4 Then
  789.                         'verify the file extension is valid
  790.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  791.                            'at least it's been named an xtl file, proceed to attempt an import..
  792.                            Set objLocalTimeline = New AMTimeline
  793.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  794.                            'verify restoration
  795.                            If ObjPtr(objLocalTimeline) > 0 Then
  796.                               'import succeeded; clean-up global scope
  797.                               If ObjPtr(gbl_objTimeline) > 0 Then
  798.                                  Call ClearTimeline(gbl_objTimeline)
  799.                                  Set gbl_objTimeline = Nothing
  800.                               End If
  801.                               'assign the local timeline to global scope
  802.                               Set gbl_objTimeline = objLocalTimeline
  803.                               'render the timeline and derive a filter graph manager
  804.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  805.                               'map the timeline to the userinterface
  806.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  807.                               mnuTimeLineClearRenderEngine.Enabled = False
  808.                               'update the button(s)
  809.                               With tbMain.Buttons
  810.                                  .Item("Play").Image = 6
  811.                                  .Item("Pause").Image = 7
  812.                                  .Item("Stop").Image = 22
  813.                                  .Item("Rewind").Image = 18
  814.                                  .Item("FastForward").Image = 24
  815.                                  .Item("SeekForward").Image = 23
  816.                                  .Item("SeekBackward").Image = 19
  817.                                  .Item("Play").Enabled = True
  818.                                  .Item("Pause").Enabled = True
  819.                                  .Item("Stop").Enabled = False
  820.                                  .Item("Rewind").Enabled = False
  821.                                  .Item("FastForward").Enabled = False
  822.                                  .Item("SeekForward").Enabled = False
  823.                                  .Item("SeekBackward").Enabled = False
  824.                               End With
  825.                               'update the state on the popup context menu
  826.                               mnuTimeLinePlay.Enabled = True
  827.                               mnuTimeLineStop.Enabled = False
  828.                               mnuTimeLinePause.Enabled = True
  829.                               mnuTimeLineRenderTimeLine.Enabled = False
  830.                               mnuTimeLineClearRenderEngine.Enabled = False
  831.                               'reset module-level filename
  832.                               gbl_bstrLoadFile = Data.Files(nCount)
  833.                               'reset the caption on the application's main form
  834.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  835.                               Me.Caption = "DexterVB - " & bstrFileName
  836.                            End If
  837.                         End If
  838.                         'clean-up & dereference
  839.                         If ObjPtr(objLocalTimeline) > 0 Then
  840.                            Set objLocalTimeline = Nothing
  841.                            Exit For
  842.                         End If
  843.                   End If
  844.             Next
  845.             Exit Sub
  846.             
  847. ErrLine:
  848.             Err.Clear
  849.             Exit Sub
  850.             End Sub
  851.             
  852.             
  853.             ' ******************************************************************************************************************************
  854.             ' * procedure name: Form_OLEDragOver
  855.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  856.             ' *
  857.             ' ******************************************************************************************************************************
  858.             Private Sub Form_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  859.             Dim nCount As Long
  860.             Dim bstrFileName As String
  861.             On Local Error GoTo ErrLine
  862.             
  863.             For nCount = 1 To Data.Files.Count
  864.                   bstrFileName = Data.Files(nCount)
  865.                   If Len(bstrFileName) > 4 Then
  866.                         'verify the file extension is valid
  867.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  868.                            'at least it's been named an xtl file, proceed to attempt an import..
  869.                            Effect = vbDropEffectCopy
  870.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  871.                         End If
  872.                   End If
  873.             Next
  874.             Exit Sub
  875.             
  876. ErrLine:
  877.             Err.Clear
  878.             Exit Sub
  879.             End Sub
  880.             
  881.             
  882.             ' ******************************************************************************************************************************
  883.             ' * procedure name: Form_QueryUnload
  884.             ' * procedure description:  Occurs before a form or application closes.
  885.             ' *
  886.             ' ******************************************************************************************************************************
  887.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  888.             Dim frm As Form
  889.             On Local Error GoTo ErrLine
  890.             
  891.             Select Case UnloadMode
  892.                 Case vbFormControlMenu
  893.                          '0 The user chose the Close command from the Control menu on the form.
  894.                          For Each frm In Forms
  895.                                frm.Move Screen.Width * -8, Screen.Height * -8
  896.                                frm.Visible = False: Unload frm
  897.                          Next
  898.             
  899.                 Case vbFormCode
  900.                          '1 The Unload statement is invoked from code.
  901.                          Exit Sub
  902.                          
  903.                 Case vbAppWindows
  904.                          '2 The current Microsoft Windows operating environment session is ending.
  905.                          For Each frm In Forms
  906.                                frm.Move Screen.Width * -8, Screen.Height * -8
  907.                                frm.Visible = False: Unload frm
  908.                          Next
  909.                          
  910.                 Case vbAppTaskManager
  911.                          '3 The Microsoft Windows Task Manager is closing the application.
  912.                          For Each frm In Forms
  913.                                frm.Move Screen.Width * -8, Screen.Height * -8
  914.                                frm.Visible = False: Unload frm
  915.                          Next
  916.                          End
  917.                          
  918.                 Case vbFormMDIForm
  919.                          '4 An MDI child form is closing because the MDI form is closing.
  920.                          Exit Sub
  921.                          
  922.                 Case vbFormOwner
  923.                          '5 A form is closing because its owner is closing
  924.                          For Each frm In Forms
  925.                                frm.Move Screen.Width * -8, Screen.Height * -8
  926.                                frm.Visible = False: Unload frm
  927.                          Next
  928.             End Select
  929.             Exit Sub
  930.             
  931. ErrLine:
  932.             Err.Clear
  933.             Exit Sub
  934.             End Sub
  935.             
  936.             
  937.             ' ******************************************************************************************************************************
  938.             ' * procedure name: Form_Resize
  939.             ' * procedure description:  Occurs when a form is first displayed or the size of an object changes.
  940.             ' *
  941.             ' ******************************************************************************************************************************
  942.             Private Sub Form_Resize()
  943.             Dim Septum As Single
  944.             Dim InternalTop As Single
  945.             Dim InternalHeight As Single
  946.             On Local Error GoTo ErrLine
  947.             
  948.             Septum = 65  'assign the septum a specified width
  949.             
  950.             If ControlAvailable("ctrlCoolBar") = True And ControlAvailable("sbStatus") = True Then
  951.                'BOTH THE COOLBAR & STATUSBAR CONTROLS ARE AVAILABLE, PROCEED TO RESIZE
  952.                
  953.                      If Me.Controls("ctrlCoolBar").Visible = True And Controls("sbStatus").Visible = True Then
  954.                          'position the coolbar
  955.                          If Me.Controls("ctrlCoolBar").Top <> Me.ScaleTop Then Me.Controls("ctrlCoolBar").Top = Me.ScaleTop
  956.                          If Me.Controls("ctrlCoolBar").Left <> Me.ScaleLeft Then Me.Controls("ctrlCoolBar").Left = Me.ScaleLeft
  957.                          If Me.Controls("ctrlCoolBar").Width <> Me.ScaleWidth Then Me.Controls("ctrlCoolBar").Width = Me.ScaleWidth
  958.                          'get the internal measurement(s)
  959.                          InternalTop = Me.ScaleTop + Me.Controls("ctrlCoolBar").Height
  960.                          InternalHeight = Me.ScaleHeight - (Me.Controls("ctrlCoolBar").Height + Me.Controls("sbStatus").Height)
  961.                          'verify that the measurement(s) are valid
  962.                          If InternalTop < 0 Then InternalTop = 0
  963.                          If InternalHeight < 0 Then InternalHeight = 0
  964.                          
  965.                     ElseIf Me.Controls("ctrlCoolBar").Visible = True And Controls("sbStatus").Visible = False Then
  966.                         'position the coolbar
  967.                          If Me.Controls("ctrlCoolBar").Top <> Me.ScaleTop Then Me.Controls("ctrlCoolBar").Top = Me.ScaleTop
  968.                          If Me.Controls("ctrlCoolBar").Left <> Me.ScaleLeft Then Me.Controls("ctrlCoolBar").Left = Me.ScaleLeft
  969.                          If Me.Controls("ctrlCoolBar").Width <> Me.ScaleWidth Then Me.Controls("ctrlCoolBar").Width = Me.ScaleWidth
  970.                          'get the internal measurement(s)
  971.                          InternalTop = Me.ScaleTop + Me.Controls("ctrlCoolBar").Height
  972.                          InternalHeight = Me.ScaleHeight - (Me.Controls("ctrlCoolBar").Height)
  973.                          'verify that the measurement(s) are valid
  974.                          If InternalTop < 0 Then InternalTop = 0
  975.                     
  976.                     ElseIf Me.Controls("ctrlCoolBar").Visible = False And Me.Controls("sbStatus").Visible = True Then
  977.                          'get the internal measurement(s)
  978.                          InternalTop = Me.ScaleTop
  979.                          InternalHeight = Me.ScaleHeight - (Me.Controls("sbStatus").Height)
  980.                          'verify that the measurement(s) are valid
  981.                          If InternalTop < 0 Then InternalTop = 0
  982.                          If InternalHeight < 0 Then InternalHeight = 0
  983.                     
  984.                     ElseIf Me.Controls("ctrlCoolBar").Visible = False And Controls("sbStatus").Visible = False Then
  985.                          'get the internal measurement(s)
  986.                          InternalTop = Me.ScaleTop
  987.                          InternalHeight = Me.ScaleHeight
  988.                          'verify that the measurement(s) are valid
  989.                          If InternalTop < 0 Then InternalTop = 0
  990.                          If InternalHeight < 0 Then InternalHeight = 0
  991.                     End If
  992.             End If
  993.             
  994.             
  995.             If ControlAvailable("tvwSimpleTree") = True And ControlAvailable("lstViewInfo") = True Then
  996.                'THE TREEVIEW & LISTVIEW ARE ADDITIONALLY AVAILABLE, PROCEED TO RESIZE
  997.                
  998.                     If Me.Controls("tvwSimpleTree").Visible = True And Controls("lstViewInfo").Visible = False Then
  999.                         'position the treeview
  1000.                         If Me.Controls("tvwSimpleTree").Top <> InternalTop Then Me.Controls("tvwSimpleTree").Top = InternalTop
  1001.                         If Me.Controls("tvwSimpleTree").Left <> 0 Then Me.Controls("tvwSimpleTree").Left = 0
  1002.                         If Me.Controls("tvwSimpleTree").Height <> InternalHeight Then Me.Controls("tvwSimpleTree").Height = InternalHeight
  1003.                         'position the listview
  1004.                         If Me.Controls("lstViewInfo").Top <> InternalTop Then Me.Controls("lstViewInfo").Top = InternalTop
  1005.                         If (Me.Controls("lstViewInfo").Left + Me.Controls("tvwSimpleTree").Width) + Septum > 0 Then Me.Controls("lstViewInfo").Left = (Me.Controls("tvwSimpleTree").Left + Me.Controls("tvwSimpleTree").Width) + Septum
  1006.                         If Me.Controls("lstViewInfo").Height <> InternalHeight Then Me.Controls("lstViewInfo").Height = InternalHeight
  1007.                         If (Me.ScaleWidth - Me.Controls("lstViewInfo").Width) - Septum > 0 Then Me.Controls("lstViewInfo").Width = (Me.ScaleWidth - Me.Controls("tvwSimpleTree").Width) - Septum
  1008.                     
  1009.                     ElseIf Me.Controls("tvwSimpleTree").Visible = True And Controls("lstViewInfo").Visible = True Then
  1010.                        'position the treeview
  1011.                         If Me.Controls("tvwSimpleTree").Top <> InternalTop Then Me.Controls("tvwSimpleTree").Top = InternalTop
  1012.                         If Me.Controls("tvwSimpleTree").Left <> 0 Then Me.Controls("tvwSimpleTree").Left = 0
  1013.                         If Me.Controls("tvwSimpleTree").Height <> InternalHeight Then Me.Controls("tvwSimpleTree").Height = InternalHeight
  1014.                        'position the listview
  1015.                         If Me.Controls("lstViewInfo").Top <> InternalTop Then Me.Controls("lstViewInfo").Top = InternalTop
  1016.                         If (Me.Controls("lstViewInfo").Left + Me.Controls("tvwSimpleTree").Width) + Septum > 0 Then Me.Controls("lstViewInfo").Left = (Me.Controls("tvwSimpleTree").Left + Me.Controls("tvwSimpleTree").Width) + Septum
  1017.                         If Me.Controls("lstViewInfo").Height <> InternalHeight Then Me.Controls("lstViewInfo").Height = InternalHeight
  1018.                         If (Me.ScaleWidth - Me.Controls("lstViewInfo").Width) - Septum > 0 Then Me.Controls("lstViewInfo").Width = (Me.ScaleWidth - Me.Controls("tvwSimpleTree").Width) - Septum
  1019.                        
  1020.                     ElseIf Me.Controls("tvwSimpleTree").Visible = False And Controls("lstViewInfo").Visible = True Then
  1021.                         'position the treeview
  1022.                         If Me.Controls("lstViewInfo").Top <> InternalTop Then Me.Controls("lstViewInfo").Top = InternalTop
  1023.                         If Me.Controls("lstViewInfo").Left <> 0 Then Me.Controls("lstViewInfo").Left = 0
  1024.                         If Me.Controls("lstViewInfo").Height <> InternalHeight Then Me.Controls("lstViewInfo").Height = InternalHeight
  1025.                     
  1026.                     ElseIf Me.Controls("tvwSimpleTree").Visible = False And Controls("lstViewInfo").Visible = False Then
  1027.                         Exit Sub
  1028.                     End If
  1029.             End If
  1030.             
  1031.             'ensure listview's column headers get resized as well..
  1032.             If ControlAvailable("lstViewInfo") Then
  1033.                If lstViewInfo.Visible Then
  1034.                   If lstViewInfo.ColumnHeaders.Count > 0 Then
  1035.                      If lstViewInfo.ColumnHeaders(2).Width <> (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width) Then _
  1036.                         lstViewInfo.ColumnHeaders(2).Width = (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width)
  1037.                   End If
  1038.                End If
  1039.             End If
  1040.             Exit Sub
  1041.             
  1042. ErrLine:
  1043.             Err.Clear
  1044.             Exit Sub
  1045.             End Sub
  1046.             
  1047.             
  1048.             ' ******************************************************************************************************************************
  1049.             ' * procedure name: Form_Terminate
  1050.             ' * procedure description:  Occurs when all references to an instance of a Form, MDIForm, or class are removed from memory.
  1051.             ' *
  1052.             ' ******************************************************************************************************************************
  1053.             Private Sub Form_Terminate()
  1054.             On Local Error GoTo ErrLine
  1055.             
  1056.             'dereference & clean-up module-level data
  1057.             If ObjPtr(gbl_objQuartzVB) > 0 Then Set gbl_objQuartzVB = Nothing
  1058.             If ObjPtr(gbl_colNormalEnum) > 0 Then Set gbl_colNormalEnum = Nothing
  1059.             
  1060.             'dereference & clean-up application-level data
  1061.             If ObjPtr(gbl_objTimeline) > 0 Then Set gbl_objTimeline = Nothing
  1062.             If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  1063.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  1064.             If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  1065.             Exit Sub
  1066.             
  1067. ErrLine:
  1068.             Err.Clear
  1069.             Exit Sub
  1070.             End Sub
  1071.             
  1072.             
  1073.             ' ******************************************************************************************************************************
  1074.             ' * procedure name: Form_Unload
  1075.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  1076.             ' *
  1077.             ' ******************************************************************************************************************************
  1078.             Private Sub Form_Unload(Cancel As Integer)
  1079.             On Local Error GoTo ErrLine
  1080.             With Me
  1081.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  1082.             End With
  1083.             Exit Sub
  1084.             
  1085. ErrLine:
  1086.             Err.Clear
  1087.             Exit Sub
  1088.             End Sub
  1089. ' **************************************************************************************************************************************
  1090. ' * PRIVATE INTERFACE- MENU EVENT HANDLERS
  1091.             ' ******************************************************************************************************************************
  1092.             ' * procedure name: mnuClip_Click
  1093.             ' * procedure description:  Occurs when the clip popup context menu is invoked
  1094.             ' *
  1095.             ' ******************************************************************************************************************************
  1096.             Private Sub mnuClip_Click()
  1097.             On Local Error GoTo ErrLine
  1098.             
  1099.             'set menu state
  1100.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1101.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  1102.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1103.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1104.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  1105.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1106.                   If mnuClipCollapse.Enabled = False Then mnuClipCollapse.Enabled = True
  1107.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  1108.                   If mnuClipExpand.Enabled = False Then mnuClipExpand.Enabled = True
  1109.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1110.                Else
  1111.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1112.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1113.                End If
  1114.             End If
  1115.             Exit Sub
  1116.             
  1117. ErrLine:
  1118.             Err.Clear
  1119.             Exit Sub
  1120.             End Sub
  1121.             
  1122.             
  1123.             ' ******************************************************************************************************************************
  1124.             ' * procedure name: mnuClipCollapse_Click
  1125.             ' * procedure description:  Occurs when the clip popup context menu's 'Collapse' option is elected
  1126.             ' *
  1127.             ' ******************************************************************************************************************************
  1128.             Private Sub mnuClipCollapse_Click()
  1129.             On Local Error GoTo ErrLine
  1130.             
  1131.             'collapse the treeview
  1132.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1133.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  1134.                   tvwSimpleTree.SelectedItem.Expanded = False
  1135.                   If mnuClipExpand.Enabled = False Then mnuClipExpand.Enabled = True
  1136.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1137.                End If
  1138.             End If
  1139.             Exit Sub
  1140.             
  1141. ErrLine:
  1142.             Err.Clear
  1143.             Exit Sub
  1144.             End Sub
  1145.             
  1146.             
  1147.             ' ******************************************************************************************************************************
  1148.             ' * procedure name: mnuClipExpand_Click
  1149.             ' * procedure description:  Occurs when the clip popup context menu's 'Expand' option is elected
  1150.             ' *
  1151.             ' ******************************************************************************************************************************
  1152.             Private Sub mnuClipExpand_Click()
  1153.             On Local Error GoTo ErrLine
  1154.             
  1155.             'expand the treeview
  1156.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1157.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  1158.                   tvwSimpleTree.SelectedItem.Expanded = True
  1159.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1160.                   If mnuClipCollapse.Enabled = False Then mnuClipCollapse.Enabled = True
  1161.                End If
  1162.             End If
  1163.             Exit Sub
  1164.             
  1165. ErrLine:
  1166.             Err.Clear
  1167.             Exit Sub
  1168.             End Sub
  1169.             ' ******************************************************************************************************************************
  1170.             ' * procedure name: mnuClipDelete_Click
  1171.             ' * procedure description:  Occurs when the clip popup context menu's 'Delete' option is elected
  1172.             ' *
  1173.             ' ******************************************************************************************************************************
  1174.             Private Sub mnuClipDelete_Click()
  1175.             Dim objSource As AMTimelineSrc
  1176.             On Local Error GoTo ErrLine
  1177.             
  1178.             'obtain the source from the global timeline object
  1179.             'which is reset when the user clicks a node on the tree
  1180.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1181.                Set objSource = gbl_objDexterObject
  1182.             Else: Exit Sub
  1183.             End If
  1184.             
  1185.             'remove the item
  1186.             Call gbl_objDexterObject.RemoveAll
  1187.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  1188.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  1189.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  1190.             
  1191.             'clean-up & dereference
  1192.             If ObjPtr(objSource) > 0 Then Set objSource = Nothing
  1193.             Exit Sub
  1194.             
  1195. ErrLine:
  1196.             Err.Clear
  1197.             Exit Sub
  1198.             End Sub
  1199.             
  1200.             
  1201.             ' ******************************************************************************************************************************
  1202.             ' * procedure name: mnuClipEdit_Click
  1203.             ' * procedure description:  Occurs when the clip popup context menu's 'Edit' option is elected
  1204.             ' *
  1205.             ' ******************************************************************************************************************************
  1206.             Private Sub mnuClipEdit_Click()
  1207.             Dim nMuted As Long
  1208.             Dim dblTStart As Double
  1209.             Dim dblTStop As Double
  1210.             Dim dblMStart As Double
  1211.             Dim dblMStop As Double
  1212.             Dim nStretchMode As Long
  1213.             Dim nStreamNumber As Long
  1214.             Dim dblDefaultFPS As Double
  1215.             Dim dblMediaLength As Double
  1216.             Dim bstrClipMediaName As String
  1217.             Dim objSourceClip As AMTimelineSrc
  1218.             On Local Error GoTo ErrLine
  1219.             
  1220.             'obtain the source from the global timeline object
  1221.             'which is reset when the user clicks a node on the tree
  1222.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1223.                Set objSourceClip = gbl_objDexterObject
  1224.             Else: Exit Sub
  1225.             End If
  1226.             
  1227.             'obtain existing group information
  1228.             If ObjPtr(objSourceClip) > 0 Then
  1229.                With objSourceClip
  1230.                   'get media name
  1231.                   bstrClipMediaName = .GetMediaName
  1232.                   'get dexter start & stop times
  1233.                   Call gbl_objDexterObject.GetStartStop2(dblTStart, dblTStop)
  1234.                   'get media start & stop times
  1235.                   Call .GetMediaTimes2(dblMStart, dblMStop)
  1236.                   'get medialength
  1237.                   dblMediaLength = (dblMStop - dblMStart)
  1238.                   'get stream number
  1239.                   Call .GetStreamNumber(nStreamNumber)
  1240.                   'get default fps
  1241.                   Call .GetDefaultFPS(dblDefaultFPS)
  1242.                   'get stretch mode
  1243.                   Call .GetStretchMode(nStretchMode)
  1244.                   'get muted
  1245.                   Call gbl_objDexterObject.GetMuted(nMuted)
  1246.                End With
  1247.             End If
  1248.             
  1249.             'hide the dialog
  1250.             Load frmClip
  1251.             frmClip.Visible = False
  1252.             
  1253.             'update the form with the existing information
  1254.             With frmClip
  1255.                .txtMediaName = CStr(bstrClipMediaName)
  1256.                .txtMStart = CStr(dblMStart)
  1257.                .txtMStop = CStr(dblMStop)
  1258.                .txtTStart = CStr(dblTStart)
  1259.                .txtTStop = CStr(dblTStop)
  1260.                .txtMediaLength = CStr(dblMediaLength)
  1261.                .txtStreamNumber = CStr(nStreamNumber)
  1262.                .txtFPS = CStr(dblDefaultFPS)
  1263.                .txtStretchMode = CStr(nStretchMode)
  1264.                .txtMuted = CStr(nMuted)
  1265.             End With
  1266.             
  1267.             'display the dialog
  1268.             frmClip.Caption = "Edit Source"
  1269.             frmClip.Show vbModal, Me
  1270.             
  1271.             'wait until the user closes the dialog
  1272.             Do Until frmClip.Visible = False: DoEvents
  1273.             Loop
  1274.             'verify unload mode
  1275.             If frmClip.UnloadMode = 1 Then
  1276.                Unload frmClip: Set frmClip = Nothing: Exit Sub
  1277.             End If
  1278.             
  1279.             'update the timeline info given the new information
  1280.             With objSourceClip
  1281.                'set the media name
  1282.                If frmClip.txtMediaName.Text <> vbNullString Then
  1283.                   Call .SetMediaName(CStr(frmClip.txtMediaName.Text))
  1284.                End If
  1285.                'set the media times
  1286.                If IsNumeric(frmClip.txtMStart.Text) Then
  1287.                   Call .SetMediaTimes2(CDbl(frmClip.txtMStart.Text), CDbl(frmClip.txtMStop.Text))
  1288.                End If
  1289.                'set the media length
  1290.                If IsNumeric(frmClip.txtMStop.Text) Then
  1291.                   Call .SetMediaLength2(CDbl(frmClip.txtTStop.Text) - CDbl(frmClip.txtTStart.Text))
  1292.                End If
  1293.                'set stream number
  1294.                If IsNumeric(frmClip.txtStreamNumber.Text) Then
  1295.                   Call .SetStreamNumber(CLng(frmClip.txtStreamNumber.Text))
  1296.                End If
  1297.                'set default frames per second
  1298.                If IsNumeric(frmClip.txtFPS.Text) Then
  1299.                   Call .SetDefaultFPS(CDbl(frmClip.txtFPS.Text))
  1300.                End If
  1301.                'set stretch mode
  1302.                If IsNumeric(frmClip.txtStretchMode.Text) Then
  1303.                   Call .SetStretchMode(CLng(frmClip.txtStretchMode.Text))
  1304.                End If
  1305.                'set muted state
  1306.                If IsNumeric(frmClip.txtMuted.Text) Then
  1307.                   Call gbl_objDexterObject.SetMuted(CLng(frmClip.txtMuted.Text))
  1308.                End If
  1309.             End With
  1310.             
  1311.             'refresh the ide
  1312.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1313.             
  1314.             'destroy the dialog
  1315.             Unload frmClip: Set frmClip = Nothing
  1316.             Exit Sub
  1317.             
  1318. ErrLine:
  1319.             Err.Clear
  1320.             Exit Sub
  1321.             End Sub
  1322.             
  1323.             ' ******************************************************************************************************************************
  1324.             ' * procedure name: mnuComp_Click
  1325.             ' * procedure description:  Occurs when the composition popup context menu is invoked
  1326.             ' *
  1327.             ' ******************************************************************************************************************************
  1328.             Private Sub mnuComp_Click()
  1329.             On Local Error GoTo ErrLine
  1330.             
  1331.             'set menu state
  1332.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1333.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  1334.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1335.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1336.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  1337.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1338.                   If mnuCompCollapse.Enabled = False Then mnuCompCollapse.Enabled = True
  1339.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  1340.                   If mnuCompExpand.Enabled = False Then mnuCompExpand.Enabled = True
  1341.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1342.                Else
  1343.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1344.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1345.                End If
  1346.             End If
  1347.             Exit Sub
  1348.             
  1349. ErrLine:
  1350.             Err.Clear
  1351.             Exit Sub
  1352.             End Sub
  1353.             
  1354.             
  1355.             ' ******************************************************************************************************************************
  1356.             ' * procedure name: mnuCompCollapse_Click
  1357.             ' * procedure description:  Occurs when the composition popup context menu's 'Collapse' option is elected
  1358.             ' *
  1359.             ' ******************************************************************************************************************************
  1360.             Private Sub mnuCompCollapse_Click()
  1361.             On Local Error GoTo ErrLine
  1362.             
  1363.             'collapse the treeview
  1364.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1365.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  1366.                   tvwSimpleTree.SelectedItem.Expanded = False
  1367.                   If mnuCompExpand.Enabled = False Then mnuCompExpand.Enabled = True
  1368.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1369.                End If
  1370.             End If
  1371.             Exit Sub
  1372.             
  1373. ErrLine:
  1374.             Err.Clear
  1375.             Exit Sub
  1376.             End Sub
  1377.             
  1378.             
  1379.             ' ******************************************************************************************************************************
  1380.             ' * procedure name: mnuCompExpand_Click
  1381.             ' * procedure description:  Occurs when the composition popup context menu's 'Expand' option is elected
  1382.             ' *
  1383.             ' ******************************************************************************************************************************
  1384.             Private Sub mnuCompExpand_Click()
  1385.             On Local Error GoTo ErrLine
  1386.             
  1387.             'expand the treeview
  1388.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1389.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  1390.                   tvwSimpleTree.SelectedItem.Expanded = True
  1391.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1392.                   If mnuCompCollapse.Enabled = False Then mnuCompCollapse.Enabled = True
  1393.                End If
  1394.             End If
  1395.             Exit Sub
  1396.             
  1397. ErrLine:
  1398.             Err.Clear
  1399.             Exit Sub
  1400.             End Sub
  1401.             
  1402.             
  1403.             ' ******************************************************************************************************************************
  1404.             ' * procedure name: mnuCompAddComp_Click
  1405.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Composition' option is elected
  1406.             ' *
  1407.             ' ******************************************************************************************************************************
  1408.             Private Sub mnuCompAddComp_Click()
  1409.             Dim nPriority As Long
  1410.             Dim dblStartTime As Double
  1411.             Dim dblStopTime As Double
  1412.             Dim objNewComposite As AMTimelineComp
  1413.             On Local Error GoTo ErrLine
  1414.             
  1415.             'display the dialog
  1416.             frmComp.Caption = "Add Composition"
  1417.             frmComp.Show vbModal, Me
  1418.             
  1419.             'wait until the user closes the dialog
  1420.             Do Until frmComp.Visible = False: DoEvents
  1421.             Loop
  1422.             'verify unload mode
  1423.             If frmComp.UnloadMode = 1 Then
  1424.                Unload frmComp: Set frmComp = Nothing: Exit Sub
  1425.             End If
  1426.             
  1427.             'query the dialog for user input
  1428.             With frmComp
  1429.                nPriority = CLng(.txtPriority.Text)
  1430.                dblStartTime = CDbl(.txtStartTime.Text)
  1431.                dblStopTime = CDbl(.txtStopTime.Text)
  1432.             End With
  1433.             
  1434.             'insert the composite into the timeline
  1435.             If ObjPtr(gbl_objTimeline) > 0 Then
  1436.                Set objNewComposite = CreateComposite(gbl_objTimeline)
  1437.                If ObjPtr(objNewComposite) > 0 Then Call InsertComposite(objNewComposite, gbl_objDexterObject)
  1438.                If ObjPtr(gbl_objDexterObject) > 0 Then Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  1439.                'refresh the ide
  1440.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1441.             End If
  1442.             
  1443.             'unload the dialog
  1444.             Unload frmComp: Set frmComp = Nothing
  1445.             Exit Sub
  1446.             
  1447. ErrLine:
  1448.             Err.Clear
  1449.             Exit Sub
  1450.             End Sub
  1451.             
  1452.             
  1453.             ' ******************************************************************************************************************************
  1454.             ' * procedure name: mnuCompAddEffect_Click
  1455.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Effect' option is elected
  1456.             ' *
  1457.             ' ******************************************************************************************************************************
  1458.             Private Sub mnuCompAddEffect_Click()
  1459.             Dim nEffectPriority As Long
  1460.             Dim bstrEffectGUID As String
  1461.             Dim dblEffectStopTime As Double
  1462.             Dim dblEffectStartTime As Double
  1463.             Dim objNewEffect As AMTimelineEffect
  1464.             Dim objTimelineObject As AMTimelineObj
  1465.             On Local Error GoTo ErrLine
  1466.             
  1467.             'display the insert effect dialog
  1468.             frmEffect.Caption = "Add Effect"
  1469.             frmEffect.Show vbModal, Me
  1470.             
  1471.             'wait until the user closes the dialog
  1472.             Do: DoEvents
  1473.             If frmEffect.Visible = False Then Exit Do
  1474.             Loop
  1475.             'verify unload mode
  1476.             If frmEffect.UnloadMode = 1 Then
  1477.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  1478.             End If
  1479.             
  1480.             'query the dialog information
  1481.             With frmEffect
  1482.                If IsNumeric(.txtStartTime.Text) Then
  1483.                   dblEffectStartTime = CDbl(.txtStartTime.Text)
  1484.                End If
  1485.                If IsNumeric(.txtStopTime.Text) Then
  1486.                   dblEffectStopTime = CDbl(.txtStopTime.Text)
  1487.                End If
  1488.                If IsNumeric(.txtPriority.Text) Then
  1489.                   nEffectPriority = CLng(.txtPriority.Text)
  1490.                End If
  1491.                If .cmbEffect.Text <> vbNullString Then
  1492.                   bstrEffectGUID = CStr(.cmbEffect.Text)
  1493.                End If
  1494.             End With
  1495.             
  1496.             'insert the effect into the timeline
  1497.             If ObjPtr(gbl_objTimeline) > 0 Then
  1498.                Set objNewEffect = CreateEffect(gbl_objTimeline)
  1499.                If ObjPtr(objNewEffect) > 0 Then Call InsertEffect(objNewEffect, gbl_objDexterObject, EffectFriendlyNameToCLSID(bstrEffectGUID), dblEffectStartTime, dblEffectStopTime)
  1500.                'refresh the ide
  1501.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1502.             End If
  1503.             
  1504.             'destroy the dialog
  1505.             Unload frmEffect: Set frmEffect = Nothing
  1506.             Exit Sub
  1507.             
  1508. ErrLine:
  1509.             Err.Clear
  1510.             Exit Sub
  1511.             End Sub
  1512.             
  1513.             
  1514.             ' ******************************************************************************************************************************
  1515.             ' * procedure name: mnuCompAddTrack_Click
  1516.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Track' option is elected
  1517.             ' *
  1518.             ' ******************************************************************************************************************************
  1519.             Private Sub mnuCompAddTrack_Click()
  1520.             Dim nBlank As Long
  1521.             Dim nMuted As Long
  1522.             Dim nPriority As Long
  1523.             Dim dblStartTime As Double
  1524.             Dim dblStopTime As Double
  1525.             Dim objNewTrack As AMTimelineTrack
  1526.             On Local Error GoTo ErrLine
  1527.             
  1528.             'display the dialog
  1529.             frmTrack.Caption = "Add Track"
  1530.             frmTrack.Show vbModal, Me
  1531.             
  1532.             'wait until the user closes the dialog
  1533.             Do Until frmTrack.Visible = False: DoEvents
  1534.             Loop
  1535.             'verify unload mode
  1536.             If frmTrack.UnloadMode = 1 Then
  1537.                Unload frmTrack: Set frmTrack = Nothing: Exit Sub
  1538.             End If
  1539.             
  1540.             'obtain the user input from the dialog
  1541.             With frmTrack
  1542.                If IsNumeric(.txtBlank.Text) Then
  1543.                   nBlank = CLng(.txtBlank.Text)
  1544.                End If
  1545.                If IsNumeric(.txtMuted.Text) Then
  1546.                   nMuted = CLng(.txtMuted.Text)
  1547.                End If
  1548.                If IsNumeric(.txtMuted.Text) Then
  1549.                   nPriority = CLng(.txtMuted.Text)
  1550.                End If
  1551.                If IsNumeric(.txtStartTime.Text) Then
  1552.                   dblStartTime = CDbl(.txtStartTime.Text)
  1553.                End If
  1554.                If IsNumeric(.txtStopTime.Text) Then
  1555.                   dblStopTime = CDbl(.txtStopTime.Text)
  1556.                End If
  1557.             End With
  1558.             
  1559.             'insert the track into the timeline
  1560.             If ObjPtr(gbl_objTimeline) > 0 Then
  1561.                Set objNewTrack = CreateTrack(gbl_objTimeline)
  1562.                If ObjPtr(objNewTrack) > 0 Then Call InsertTrack(objNewTrack, gbl_objDexterObject, nPriority)
  1563.                'refresh the ide
  1564.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1565.             End If
  1566.             
  1567.             'destroy dialog
  1568.             Unload frmTrack: Set frmTrack = Nothing
  1569.             Exit Sub
  1570.             
  1571. ErrLine:
  1572.             Err.Clear
  1573.             Exit Sub
  1574.             End Sub
  1575.             
  1576.             
  1577.             ' ******************************************************************************************************************************
  1578.             ' * procedure name: mnuCompAddTransition_Click
  1579.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Transition' option is elected
  1580.             ' *
  1581.             ' ******************************************************************************************************************************
  1582.             Private Sub mnuCompAddTransition_Click()
  1583.             Dim nCutpoint As Long
  1584.             Dim nCutsOnly As Long
  1585.             Dim nSwapInputs As Long
  1586.             Dim bstrTransition As String
  1587.             Dim dblStartTime As Double
  1588.             Dim dblStopTime As Double
  1589.             Dim objNewTransition As AMTimelineTrans
  1590.             On Local Error GoTo ErrLine
  1591.             
  1592.             'display the dialog
  1593.             frmTransitions.Caption = "Add Transition"
  1594.             frmTransitions.Show vbModal, Me
  1595.             
  1596.             'wait until the user closes the dialog
  1597.             Do Until frmTransitions.Visible = False: DoEvents
  1598.             Loop
  1599.             'verify unload mode
  1600.             If frmTransitions.UnloadMode = 1 Then
  1601.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  1602.             End If
  1603.             
  1604.             'obtain user input
  1605.             With frmTransitions
  1606.                If IsNumeric(.txtCutpoint.Text) Then
  1607.                   nCutpoint = CLng(.txtCutpoint.Text)
  1608.                End If
  1609.                If IsNumeric(.txtCutsOnly.Text) Then
  1610.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  1611.                End If
  1612.                If IsNumeric(.txtSwapInputs.Text) Then
  1613.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  1614.                End If
  1615.                If IsNumeric(.txtStartTime.Text) Then
  1616.                   dblStartTime = CDbl(.txtStartTime.Text)
  1617.                End If
  1618.                If IsNumeric(.txtStopTime.Text) Then
  1619.                   dblStopTime = CDbl(.txtStopTime.Text)
  1620.                End If
  1621.                If .cmbTransition.Text <> vbNullString Then
  1622.                   bstrTransition = CStr(.cmbTransition.Text)
  1623.                End If
  1624.             End With
  1625.             
  1626.             'insert the transition into the timeline
  1627.             If ObjPtr(gbl_objTimeline) > 0 Then
  1628.                Set objNewTransition = CreateTransition(gbl_objTimeline)
  1629.                If ObjPtr(objNewTransition) > 0 Then Call InsertTransition(objNewTransition, gbl_objDexterObject, TransitionFriendlyNameToCLSID(bstrTransition), dblStartTime, dblStopTime)
  1630.                'refresh the ide
  1631.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1632.             End If
  1633.             
  1634.             'destroy the dialog
  1635.             Unload frmTransitions: Set frmTransitions = Nothing
  1636.             Exit Sub
  1637.             
  1638. ErrLine:
  1639.             Err.Clear
  1640.             Exit Sub
  1641.             End Sub
  1642.             
  1643.             
  1644.             ' ******************************************************************************************************************************
  1645.             ' * procedure name: mnuCompDelete_Click
  1646.             ' * procedure description:  Occurs when the composition popup context menu's 'Delete' option is elected
  1647.             ' *
  1648.             ' ******************************************************************************************************************************
  1649.             Private Sub mnuCompDelete_Click()
  1650.             Dim objComposition As AMTimelineComp
  1651.             On Local Error GoTo ErrLine
  1652.             
  1653.             'obtain the composition from the global timeline object
  1654.             'which is reset when the user clicks a node on the tree
  1655.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1656.                Set objComposition = gbl_objDexterObject
  1657.             Else: Exit Sub
  1658.             End If
  1659.             
  1660.             'remove the item
  1661.             Call gbl_objDexterObject.RemoveAll
  1662.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  1663.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  1664.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  1665.             
  1666.             'clean-up & dereference
  1667.             If ObjPtr(objComposition) > 0 Then Set objComposition = Nothing
  1668.             Exit Sub
  1669.             
  1670. ErrLine:
  1671.             Err.Clear
  1672.             Exit Sub
  1673.             End Sub
  1674.             
  1675.             
  1676.             ' ******************************************************************************************************************************
  1677.             ' * procedure name: mnuCompEdit_Click
  1678.             ' * procedure description:  Occurs when the composition popup context menu's 'Edit' option is elected
  1679.             ' *
  1680.             ' ******************************************************************************************************************************
  1681.             Private Sub mnuCompEdit_Click()
  1682.             Dim nPriority As Long
  1683.             Dim dblStopTime As Double
  1684.             Dim dblStartTime As Double
  1685.             Dim objComp As AMTimelineComp
  1686.             On Local Error GoTo ErrLine
  1687.             
  1688.             'obtain the composition from the global timeline object
  1689.             'which is reset when the user clicks a node on the tree
  1690.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1691.                Set objComp = gbl_objDexterObject
  1692.             Else: Exit Sub
  1693.             End If
  1694.             
  1695.             'obtain existing group information
  1696.             If ObjPtr(objComp) > 0 Then
  1697.                   'get start /stoptime
  1698.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  1699.             End If
  1700.             
  1701.             'hide the dialog
  1702.             Load frmComp
  1703.             frmComp.Visible = False
  1704.             
  1705.             'update the form with the existing information
  1706.             With frmComp
  1707.                .txtPriority = 0  'methodology not available
  1708.                .txtStartTime = CStr(dblStartTime)
  1709.                .txtStopTime = CStr(dblStopTime)
  1710.             End With
  1711.             
  1712.             'display the dialog
  1713.             frmComp.Caption = "Edit Composition"
  1714.             frmComp.Show vbModal, Me
  1715.             
  1716.             'wait until the user closes the dialog
  1717.             Do Until frmComp.Visible = False: DoEvents
  1718.             Loop
  1719.             'verify unload mode
  1720.             If frmComp.UnloadMode = 1 Then
  1721.                Unload frmComp: Set frmComp = Nothing: Exit Sub
  1722.             End If
  1723.             
  1724.             'update the timeline info given the new information
  1725.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1726.                'set the media times
  1727.                If IsNumeric(frmComp.txtStopTime.Text) And IsNumeric(frmComp.txtStartTime.Text) Then
  1728.                   Call gbl_objDexterObject.SetStartStop2(CDbl(frmComp.txtStopTime.Text), CDbl(frmComp.txtStartTime.Text))
  1729.                End If
  1730.             End If
  1731.             
  1732.             'refresh the ide
  1733.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1734.             
  1735.             'destroy the dialog
  1736.             Unload frmClip: Set frmClip = Nothing
  1737.             Exit Sub
  1738.             
  1739. ErrLine:
  1740.             Err.Clear
  1741.             Exit Sub
  1742.             End Sub
  1743.             
  1744.             
  1745.             ' ******************************************************************************************************************************
  1746.             ' * procedure name: mnuEffect_Click
  1747.             ' * procedure description:  Occurs when the effect popup context menu is invoked
  1748.             ' *
  1749.             ' ******************************************************************************************************************************
  1750.             Private Sub mnuEffect_Click()
  1751.             On Local Error GoTo ErrLine
  1752.             
  1753.             'set menu state
  1754.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1755.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  1756.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1757.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1758.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  1759.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1760.                   If mnuEffectCollapse.Enabled = False Then mnuEffectCollapse.Enabled = True
  1761.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  1762.                   If mnuEffectExpand.Enabled = False Then mnuEffectExpand.Enabled = True
  1763.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1764.                Else
  1765.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1766.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1767.                End If
  1768.             End If
  1769.             Exit Sub
  1770.             
  1771. ErrLine:
  1772.             Err.Clear
  1773.             Exit Sub
  1774.             End Sub
  1775.             
  1776.             
  1777.             ' ******************************************************************************************************************************
  1778.             ' * procedure name: mnuEffectCollapse_Click
  1779.             ' * procedure description:  Occurs when the effect popup context menu's 'Collapse' option is elected
  1780.             ' *
  1781.             ' ******************************************************************************************************************************
  1782.             Private Sub mnuEffectCollapse_Click()
  1783.             On Local Error GoTo ErrLine
  1784.             
  1785.             'collapse the treeview
  1786.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1787.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  1788.                   tvwSimpleTree.SelectedItem.Expanded = False
  1789.                   If mnuEffectExpand.Enabled = False Then mnuEffectExpand.Enabled = True
  1790.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1791.                End If
  1792.             End If
  1793.             Exit Sub
  1794.             
  1795. ErrLine:
  1796.             Err.Clear
  1797.             Exit Sub
  1798.             End Sub
  1799.             
  1800.             
  1801.             ' ******************************************************************************************************************************
  1802.             ' * procedure name: mnuEffectExpand_Click
  1803.             ' * procedure description:  Occurs when the effect popup context menu's 'Expand' option is elected
  1804.             ' *
  1805.             ' ******************************************************************************************************************************
  1806.             Private Sub mnuEffectExpand_Click()
  1807.             On Local Error GoTo ErrLine
  1808.             
  1809.             'expand the treeview
  1810.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  1811.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  1812.                   tvwSimpleTree.SelectedItem.Expanded = True
  1813.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1814.                   If mnuEffectCollapse.Enabled = False Then mnuEffectCollapse.Enabled = True
  1815.                End If
  1816.             End If
  1817.             Exit Sub
  1818.             
  1819. ErrLine:
  1820.             Err.Clear
  1821.             Exit Sub
  1822.             End Sub
  1823.             
  1824.             
  1825.             ' ******************************************************************************************************************************
  1826.             ' * procedure name: mnuEffectDelete_Click
  1827.             ' * procedure description:  Occurs when the effect popup context menu's 'Delete' option is elected
  1828.             ' *
  1829.             ' ******************************************************************************************************************************
  1830.             Private Sub mnuEffectDelete_Click()
  1831.             Dim objEffect As AMTimelineEffect
  1832.             On Local Error GoTo ErrLine
  1833.             
  1834.             'obtain the effect from the global timeline object
  1835.             'which is reset when the user clicks a node on the tree
  1836.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1837.                Set objEffect = gbl_objDexterObject
  1838.             Else: Exit Sub
  1839.             End If
  1840.             
  1841.             'remove the item
  1842.             Call gbl_objDexterObject.RemoveAll
  1843.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  1844.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  1845.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  1846.             
  1847.             'clean-up & dereference
  1848.             If ObjPtr(objEffect) > 0 Then Set objEffect = Nothing
  1849.             Exit Sub
  1850.             
  1851. ErrLine:
  1852.             Err.Clear
  1853.             Exit Sub
  1854.             End Sub
  1855.             
  1856.             
  1857.             ' ******************************************************************************************************************************
  1858.             ' * procedure name: mnuEffectEdit_Click
  1859.             ' * procedure description:  Occurs when the effect popup context menu's 'Edit' option is elected
  1860.             ' *
  1861.             ' ******************************************************************************************************************************
  1862.             Private Sub mnuEffectEdit_Click()
  1863.             Dim nPriority As Long
  1864.             Dim dblStopTime As Double
  1865.             Dim dblStartTime As Double
  1866.             Dim bstrEffectCLSID As String
  1867.             Dim objEffect As AMTimelineEffect
  1868.             On Local Error GoTo ErrLine
  1869.             
  1870.             'obtain the effect from the global timeline object
  1871.             'which is reset when the user clicks a node on the tree
  1872.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1873.                Set objEffect = gbl_objDexterObject
  1874.             Else: Exit Sub
  1875.             End If
  1876.             
  1877.             'obtain existing group information
  1878.             If ObjPtr(objEffect) > 0 Then
  1879.                With objEffect
  1880.                   'get priority
  1881.                   Call objEffect.EffectGetPriority(nPriority)
  1882.                   'get start /stoptime
  1883.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  1884.                   'get effect guid
  1885.                   bstrEffectCLSID = gbl_objDexterObject.GetSubObjectGUIDB
  1886.                End With
  1887.             End If
  1888.             
  1889.             'hide the dialog
  1890.             Load frmEffect
  1891.             frmEffect.Visible = False
  1892.             
  1893.             'update the form with the existing information
  1894.             With frmEffect
  1895.                .txtPriority = 0  'methodology not available
  1896.                .txtStartTime = CStr(dblStartTime)
  1897.                .txtStopTime = CStr(dblStopTime)
  1898.                .cmbEffect.Text = CStr(EffectCLSIDToFriendlyName(bstrEffectCLSID))
  1899.             End With
  1900.             
  1901.             'display the dialog
  1902.             frmEffect.Caption = "Edit Composition"
  1903.             frmEffect.Show vbModal, Me
  1904.             
  1905.             'wait until the user closes the dialog
  1906.             Do Until frmEffect.Visible = False: DoEvents
  1907.             Loop
  1908.             'verify unload mode
  1909.             If frmEffect.UnloadMode = 1 Then
  1910.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  1911.             End If
  1912.             
  1913.             'query the dialog information
  1914.             With frmEffect
  1915.                If IsNumeric(.txtStartTime.Text) Then
  1916.                   dblStartTime = CDbl(.txtStartTime.Text)
  1917.                End If
  1918.                If IsNumeric(.txtStopTime.Text) Then
  1919.                   dblStopTime = CDbl(.txtStopTime.Text)
  1920.                End If
  1921.                If IsNumeric(.txtPriority.Text) Then
  1922.                   nPriority = CLng(.txtPriority.Text)
  1923.                End If
  1924.                If .cmbEffect.Text <> vbNullString Then
  1925.                   bstrEffectCLSID = CStr(.cmbEffect.Text)
  1926.                End If
  1927.             End With
  1928.             
  1929.             'update the timeline info given the new information
  1930.             If ObjPtr(gbl_objDexterObject) > 0 Then
  1931.                'set the media times
  1932.                Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  1933.                'set the effect
  1934.                If EffectFriendlyNameToCLSID(bstrEffectCLSID) <> vbNullString Then
  1935.                   Call gbl_objDexterObject.SetSubObjectGUIDB(EffectFriendlyNameToCLSID(bstrEffectCLSID))
  1936.                End If
  1937.                'refresh the ide
  1938.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1939.             End If
  1940.             
  1941.             'destroy the dialog
  1942.             Unload frmClip: Set frmClip = Nothing
  1943.             Exit Sub
  1944.             
  1945. ErrLine:
  1946.             Err.Clear
  1947.             Exit Sub
  1948.             End Sub
  1949.             
  1950.             
  1951.             ' ******************************************************************************************************************************
  1952.             ' * procedure name: mnuFile_Click
  1953.             ' * procedure description:  Occurs when the file popup context menu is invoked
  1954.             ' *
  1955.             ' ******************************************************************************************************************************
  1956.             Private Sub mnuFile_Click()
  1957.             On Local Error GoTo ErrLine
  1958.             
  1959.             'do not allow new timeline or open file operations when rendering..
  1960.             If ObjPtr(gbl_objQuartzVB) > 0 Then
  1961.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  1962.                   If mnuFileNew.Enabled = True Then mnuFileNew.Enabled = False
  1963.                   If mnuFileOpen.Enabled = True Then mnuFileOpen.Enabled = False
  1964.                Else
  1965.                   If mnuFileNew.Enabled = False Then mnuFileNew.Enabled = True
  1966.                   If mnuFileOpen.Enabled = False Then mnuFileOpen.Enabled = True
  1967.                End If
  1968.             End If
  1969.             Exit Sub
  1970.             
  1971. ErrLine:
  1972.             Err.Clear
  1973.             Exit Sub
  1974.             End Sub
  1975.             
  1976.             
  1977.             ' ******************************************************************************************************************************
  1978.             ' * procedure name: mnuFileExit_Click
  1979.             ' * procedure description:  Occurs when the file popup context menu's 'Exit' option is elected
  1980.             ' *
  1981.             ' ******************************************************************************************************************************
  1982.             Private Sub mnuFileExit_Click()
  1983.             Dim frm As Form
  1984.             On Local Error GoTo ErrLine
  1985.             
  1986.             'proceed to end the application
  1987.             For Each frm In Forms
  1988.                   frm.Move Screen.Width * -8, Screen.Height * -8
  1989.                   frm.Visible = False: Unload frm
  1990.             Next
  1991.             Exit Sub
  1992.             
  1993. ErrLine:
  1994.             Err.Clear
  1995.             Exit Sub
  1996.             End Sub
  1997.             
  1998.             
  1999.             ' ******************************************************************************************************************************
  2000.             ' * procedure name: mnuFileNew_Click
  2001.             ' * procedure description:  Occurs when the file popup context menu's 'New' option is elected
  2002.             ' *
  2003.             ' ******************************************************************************************************************************
  2004.             Private Sub mnuFileNew_Click()
  2005.             On Local Error GoTo ErrLine
  2006.             
  2007.             'display the timeline dialog
  2008.             frmTimeline.Show vbModal, Me
  2009.             frmTimeline.Caption = "Insert Timeline"
  2010.             
  2011.             'wait until the user closes the dialog
  2012.             Do Until frmTimeline.Visible = False: DoEvents
  2013.             Loop
  2014.             'determine if they canceled out
  2015.             If frmTimeline.UnloadMode = 1 Then
  2016.                Unload frmTimeline: Set frmTimeline = Nothing: Exit Sub
  2017.             End If
  2018.             'clear the existing timeline
  2019.             If ObjPtr(gbl_objTimeline) > 0 Then Call ClearTimeline(gbl_objTimeline)
  2020.             'dereference & clean-up application-level data
  2021.             If ObjPtr(gbl_objTimeline) > 0 Then Set gbl_objTimeline = Nothing
  2022.             If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  2023.             'reinitalize application-level data
  2024.             Set gbl_objTimeline = New AMTimeline
  2025.             Set gbl_objFilterGraph = New FilgraphManager
  2026.             'reinitalize the treeview/listview
  2027.             Call lstViewInfo.ListItems.Clear
  2028.             Call tvwSimpleTree.Nodes.Clear
  2029.             
  2030.             'set default(s)
  2031.             With gbl_objTimeline
  2032.                If IsNumeric(frmTimeline.txtTransitionsEnabled.Text) Then
  2033.                   .EnableTransitions CLng(frmTimeline.txtTransitionsEnabled.Text)
  2034.                End If
  2035.                If IsNumeric(frmTimeline.txtEffectsEnabled.Text) Then
  2036.                   .EnableEffects CLng(frmTimeline.txtEffectsEnabled.Text)
  2037.                End If
  2038.                If IsNumeric(frmTimeline.txtDefaultFPS.Text) Then
  2039.                   .SetDefaultFPS CDbl(frmTimeline.txtDefaultFPS.Text)
  2040.                End If
  2041.                If frmTimeline.cmbDefaultTransition.Text <> vbNullString Then
  2042.                   .SetDefaultTransitionB CStr(TransitionFriendlyNameToCLSID(frmTimeline.cmbDefaultTransition.Text))
  2043.                End If
  2044.                If frmTimeline.cmbDefaultEffect.Text <> vbNullString Then
  2045.                   .SetDefaultEffectB CStr(EffectFriendlyNameToCLSID(frmTimeline.cmbDefaultEffect.Text))
  2046.                End If
  2047.             End With
  2048.             
  2049.             'unload dialog
  2050.             Unload frmTimeline: Set frmTimeline = Nothing
  2051.             
  2052.             'update ide
  2053.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2054.             
  2055.             'update the button(s)
  2056.             With tbMain.Buttons
  2057.                .Item("Play").Image = 20
  2058.                .Item("Pause").Image = 21
  2059.                .Item("Stop").Image = 22
  2060.                .Item("Rewind").Image = 18
  2061.                .Item("FastForward").Image = 24
  2062.                .Item("SeekForward").Image = 23
  2063.                .Item("SeekBackward").Image = 19
  2064.                .Item("Play").Enabled = False
  2065.                .Item("Pause").Enabled = False
  2066.                .Item("Stop").Enabled = False
  2067.                .Item("Rewind").Enabled = False
  2068.                .Item("FastForward").Enabled = False
  2069.                .Item("SeekForward").Enabled = False
  2070.                .Item("SeekBackward").Enabled = False
  2071.             End With
  2072.             'update the state on the popup context menu
  2073.             mnuTimeLinePlay.Enabled = True
  2074.             mnuTimeLineStop.Enabled = False
  2075.             mnuTimeLinePause.Enabled = False
  2076.             mnuTimeLineRenderTimeLine.Enabled = True
  2077.             mnuTimeLineClearRenderEngine.Enabled = True
  2078.             Exit Sub
  2079.             
  2080. ErrLine:
  2081.             Err.Clear
  2082.             Exit Sub
  2083.             End Sub
  2084.             
  2085.             
  2086.             ' ******************************************************************************************************************************
  2087.             ' * procedure name: mnuFileOpen_Click
  2088.             ' * procedure description:  Occurs when the file popup context menu's 'Open' option is elected
  2089.             ' *
  2090.             ' ******************************************************************************************************************************
  2091.             Private Sub mnuFileOpen_Click()
  2092.             Dim nCount As Long
  2093.             Dim bstrFileName As String
  2094.             Dim objLocalTimeline As AMTimeline
  2095.             On Local Error GoTo ErrLine
  2096.             'display a common dialog for the user and obtain a filename
  2097.             bstrFileName = ShowCommonDlgOpen(vbNullString, "XTL", "XTL Files (*.xtl)|*.xtl|")
  2098.             'verify the file extension is valid
  2099.             If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  2100.                'at least it's been named an xtl file, proceed to attempt an import..
  2101.                Set objLocalTimeline = New AMTimeline
  2102.                Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  2103.                'verify restoration
  2104.                If ObjPtr(objLocalTimeline) > 0 Then
  2105.                   'import succeeded; clean-up application-level scope
  2106.                   If ObjPtr(gbl_objTimeline) > 0 Then
  2107.                     'dereference & clean-up timeline
  2108.                      Call ClearTimeline(gbl_objTimeline)
  2109.                      Set gbl_objTimeline = Nothing
  2110.                      'dereference & clean-up rendering
  2111.                      If ObjPtr(gbl_objQuartzVB) > 0 Then Call gbl_objQuartzVB.StopGraph
  2112.                      If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  2113.                      If ObjPtr(gbl_objRenderEngine) > 0 Then Call gbl_objRenderEngine.ScrapIt
  2114.                      If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  2115.                   End If
  2116.                   'assign the local timeline to global scope
  2117.                   Set gbl_objTimeline = objLocalTimeline
  2118.                   'render the timeline and derive a filter graph manager
  2119.                   Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  2120.                   'map the timeline to the userinterface
  2121.                   Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2122.                   mnuTimeLineClearRenderEngine.Enabled = False
  2123.                   'update the button(s)
  2124.                   With tbMain.Buttons
  2125.                      .Item("Play").Image = 6
  2126.                      .Item("Pause").Image = 7
  2127.                      .Item("Stop").Image = 22
  2128.                      .Item("Rewind").Image = 18
  2129.                      .Item("FastForward").Image = 24
  2130.                      .Item("SeekForward").Image = 23
  2131.                      .Item("SeekBackward").Image = 19
  2132.                      .Item("Play").Enabled = True
  2133.                      .Item("Pause").Enabled = True
  2134.                      .Item("Stop").Enabled = False
  2135.                      .Item("Rewind").Enabled = False
  2136.                      .Item("FastForward").Enabled = False
  2137.                      .Item("SeekForward").Enabled = False
  2138.                      .Item("SeekBackward").Enabled = False
  2139.                   End With
  2140.                   'enable/disable the state of the popup context menu's
  2141.                   If mnuTimeLinePlay.Enabled = False Then mnuTimeLinePlay.Enabled = True
  2142.                   If mnuTimeLineStop.Enabled = True Then mnuTimeLineStop.Enabled = False
  2143.                   If mnuTimeLinePause.Enabled = False Then mnuTimeLinePause.Enabled = True
  2144.                   If mnuTimeLineRenderTimeLine.Enabled = True Then mnuTimeLineRenderTimeLine.Enabled = False
  2145.                   If mnuTimeLineClearRenderEngine.Enabled = False Then mnuTimeLineClearRenderEngine.Enabled = True
  2146.                   'reset module-level filename
  2147.                   gbl_bstrLoadFile = dlgCommonDialog.FileName
  2148.                   'reset the caption on the application's main form
  2149.                   bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  2150.                   Me.Caption = "DexterVB - " & bstrFileName
  2151.                End If
  2152.             End If
  2153.             'clean-up & dereference
  2154.             If ObjPtr(objLocalTimeline) > 0 Then Set objLocalTimeline = Nothing
  2155.             Exit Sub
  2156.             
  2157. ErrLine:
  2158.             Err.Clear
  2159.             Exit Sub
  2160.             End Sub
  2161.             
  2162.             
  2163.             ' ******************************************************************************************************************************
  2164.             ' * procedure name: mnuFileSaveAs_Click
  2165.             ' * procedure description:  Occurs when the file popup context menu's 'SaveAs' option is elected
  2166.             ' *
  2167.             ' ******************************************************************************************************************************
  2168.             Private Sub mnuFileSaveAs_Click()
  2169.             Dim bstrFileName As String
  2170.             On Local Error GoTo ErrLine
  2171.             
  2172.             'display a common dialog for the user and obtain a filename
  2173.             bstrFileName = ShowCommonDlgSave(vbNullString, "XTL", "XTL Files (*.xtl)|*.xtl|Graph Files (*.grf)|*.grf|")
  2174.             
  2175.             'verify the file extension is valid
  2176.             If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  2177.                'user would like to export as an xtl file, proceed to attempt an export..
  2178.                If ObjPtr(gbl_objTimeline) > 0 Then
  2179.                   Call SaveTimeline(gbl_objTimeline, bstrFileName, DEXExportXTL)
  2180.                End If
  2181.             ElseIf InStr(1, LCase(bstrFileName), ".grf") > 0 Then
  2182.                'user would like to export as a graph file, proceed to attempt an export..
  2183.                If ObjPtr(gbl_objTimeline) > 0 Then
  2184.                   Call SaveTimeline(gbl_objTimeline, bstrFileName, DEXExportGRF)
  2185.                End If
  2186.             End If
  2187.             Exit Sub
  2188.             
  2189. ErrLine:
  2190.             Err.Clear
  2191.             Exit Sub
  2192.             End Sub
  2193.             
  2194.             
  2195.             ' ******************************************************************************************************************************
  2196.             ' * procedure name: mnuGroup_Click
  2197.             ' * procedure description:  Occurs when the group popup context menu is invoked
  2198.             ' *
  2199.             ' ******************************************************************************************************************************
  2200.             Private Sub mnuGroup_Click()
  2201.             On Local Error GoTo ErrLine
  2202.             
  2203.             'set menu state
  2204.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  2205.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  2206.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2207.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2208.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  2209.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2210.                   If mnuGroupCollapse.Enabled = False Then mnuGroupCollapse.Enabled = True
  2211.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  2212.                   If mnuGroupExpand.Enabled = False Then mnuGroupExpand.Enabled = True
  2213.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2214.                Else
  2215.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2216.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2217.                End If
  2218.             End If
  2219.             Exit Sub
  2220.             
  2221. ErrLine:
  2222.             Err.Clear
  2223.             Exit Sub
  2224.             End Sub
  2225.             
  2226.             
  2227.             ' ******************************************************************************************************************************
  2228.             ' * procedure name: mnuGroupCollapse_Click
  2229.             ' * procedure description:  Occurs when the group popup context menu's 'Collapse' option is elected
  2230.             ' *
  2231.             ' ******************************************************************************************************************************
  2232.             Private Sub mnuGroupCollapse_Click()
  2233.             On Local Error GoTo ErrLine
  2234.             
  2235.             'collapse the treeview
  2236.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  2237.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  2238.                   tvwSimpleTree.SelectedItem.Expanded = False
  2239.                   If mnuGroupExpand.Enabled = False Then mnuGroupExpand.Enabled = True
  2240.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2241.                End If
  2242.             End If
  2243.             Exit Sub
  2244.             
  2245. ErrLine:
  2246.             Err.Clear
  2247.             Exit Sub
  2248.             End Sub
  2249.             
  2250.             
  2251.             ' ******************************************************************************************************************************
  2252.             ' * procedure name: mnuGroupExpand_Click
  2253.             ' * procedure description:  Occurs when the group popup context menu's 'Expand' option is elected
  2254.             ' *
  2255.             ' ******************************************************************************************************************************
  2256.             Private Sub mnuGroupExpand_Click()
  2257.             On Local Error GoTo ErrLine
  2258.             
  2259.             'expand the treeview
  2260.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  2261.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  2262.                   tvwSimpleTree.SelectedItem.Expanded = True
  2263.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2264.                   If mnuGroupCollapse.Enabled = False Then mnuGroupCollapse.Enabled = True
  2265.                End If
  2266.             End If
  2267.             Exit Sub
  2268.             
  2269. ErrLine:
  2270.             Err.Clear
  2271.             Exit Sub
  2272.             End Sub
  2273.             
  2274.             
  2275.             ' ******************************************************************************************************************************
  2276.             ' * procedure name: mnuGroupAddComp_Click
  2277.             ' * procedure description:  Occurs when the group popup context menu's 'Add Composition' option is elected
  2278.             ' *
  2279.             ' ******************************************************************************************************************************
  2280.             Private Sub mnuGroupAddComp_Click()
  2281.             Dim nPriority As Long
  2282.             Dim dblStartTime As Double
  2283.             Dim dblStopTime As Double
  2284.             Dim objNewComposite As AMTimelineComp
  2285.             On Local Error GoTo ErrLine
  2286.             
  2287.             'display the dialog
  2288.             frmComp.Caption = "Add Composition"
  2289.             frmComp.Show vbModal, Me
  2290.             
  2291.             'wait until the user closes the dialog
  2292.             Do Until frmComp.Visible = False: DoEvents
  2293.             Loop
  2294.             'verify unload mode
  2295.             If frmComp.UnloadMode = 1 Then
  2296.                Unload frmComp: Set frmComp = Nothing: Exit Sub
  2297.             End If
  2298.             
  2299.             'query the dialog for user input
  2300.             With frmComp
  2301.                If IsNumeric(.txtPriority.Text) Then
  2302.                   nPriority = CLng(.txtPriority.Text)
  2303.                End If
  2304.                If IsNumeric(.txtStartTime.Text) Then
  2305.                   dblStartTime = CDbl(.txtStartTime.Text)
  2306.                End If
  2307.                If IsNumeric(.txtStopTime.Text) Then
  2308.                   dblStopTime = CDbl(.txtStopTime.Text)
  2309.                End If
  2310.             End With
  2311.             
  2312.             'insert the composite into the timeline
  2313.             If ObjPtr(gbl_objTimeline) > 0 Then
  2314.                Set objNewComposite = CreateComposite(gbl_objTimeline)
  2315.                If ObjPtr(objNewComposite) > 0 Then Call InsertComposite(objNewComposite, gbl_objDexterObject)
  2316.                'refresh the ide
  2317.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2318.             End If
  2319.             
  2320.             'unload the dialog
  2321.             Unload frmComp: Set frmComp = Nothing
  2322.             Exit Sub
  2323.             
  2324. ErrLine:
  2325.             Err.Clear
  2326.             Exit Sub
  2327.             End Sub
  2328.             
  2329.             
  2330.             ' ******************************************************************************************************************************
  2331.             ' * procedure name: mnuGroupAddEffect_Click
  2332.             ' * procedure description:  Occurs when the group popup context menu's 'Add Effect' option is elected
  2333.             ' *
  2334.             ' ******************************************************************************************************************************
  2335.             Private Sub mnuGroupAddEffect_Click()
  2336.             Dim nEffectPriority As Long
  2337.             Dim bstrEffectGUID As String
  2338.             Dim dblEffectStopTime As Double
  2339.             Dim dblEffectStartTime As Double
  2340.             Dim objNewEffect As AMTimelineEffect
  2341.             Dim objTimelineObject As AMTimelineObj
  2342.             On Local Error GoTo ErrLine
  2343.             
  2344.             'display the insert effect dialog
  2345.             frmEffect.Caption = "Add Effect"
  2346.             frmEffect.Show vbModal, Me
  2347.             
  2348.             'wait until the user closes the dialog
  2349.             Do: DoEvents
  2350.             If frmEffect.Visible = False Then Exit Do
  2351.             Loop
  2352.             'verify unload mode
  2353.             If frmEffect.UnloadMode = 1 Then
  2354.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  2355.             End If
  2356.             
  2357.             'query the dialog information
  2358.             With frmEffect
  2359.                If IsNumeric(.txtStartTime.Text) Then
  2360.                   dblEffectStartTime = CDbl(.txtStartTime.Text)
  2361.                End If
  2362.                If IsNumeric(.txtStopTime.Text) Then
  2363.                   dblEffectStopTime = CDbl(.txtStopTime.Text)
  2364.                End If
  2365.                If IsNumeric(.txtPriority.Text) Then
  2366.                   nEffectPriority = CLng(.txtPriority.Text)
  2367.                End If
  2368.                If .cmbEffect.Text <> vbNullString Then
  2369.                   bstrEffectGUID = CStr(.cmbEffect.Text)
  2370.                End If
  2371.             End With
  2372.             
  2373.             'insert the effect into the timeline
  2374.             If ObjPtr(gbl_objTimeline) > 0 Then
  2375.                Set objNewEffect = CreateEffect(gbl_objTimeline)
  2376.                If ObjPtr(objNewEffect) > 0 Then Call InsertEffect(objNewEffect, gbl_objDexterObject, EffectFriendlyNameToCLSID(bstrEffectGUID), dblEffectStartTime, dblEffectStopTime)
  2377.                'refresh the ide
  2378.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2379.             End If
  2380.             
  2381.             'destroy the dialog
  2382.             Unload frmEffect: Set frmEffect = Nothing
  2383.             Exit Sub
  2384.             
  2385. ErrLine:
  2386.             Err.Clear
  2387.             Exit Sub
  2388.             End Sub
  2389.             
  2390.             
  2391.             ' ******************************************************************************************************************************
  2392.             ' * procedure name: mnuGroupAddTrack_Click
  2393.             ' * procedure description:  Occurs when the group popup context menu's 'Add Track' option is elected
  2394.             ' *
  2395.             ' ******************************************************************************************************************************
  2396.             Private Sub mnuGroupAddTrack_Click()
  2397.             Dim nBlank As Long
  2398.             Dim nMuted As Long
  2399.             Dim nPriority As Long
  2400.             Dim dblStartTime As Double
  2401.             Dim dblStopTime As Double
  2402.             Dim objNewTrack As AMTimelineTrack
  2403.             On Local Error GoTo ErrLine
  2404.             
  2405.             'display the dialog
  2406.             frmTrack.Caption = "Add Track"
  2407.             frmTrack.Show vbModal, Me
  2408.             
  2409.             'wait until the user closes the dialog
  2410.             Do Until frmTrack.Visible = False: DoEvents
  2411.             Loop
  2412.             'verify unload mode
  2413.             If frmTrack.UnloadMode = 1 Then
  2414.                Unload frmTrack: Set frmTrack = Nothing: Exit Sub
  2415.             End If
  2416.             
  2417.             'obtain the user input from the dialog
  2418.             With frmTrack
  2419.                If IsNumeric(.txtBlank.Text) Then
  2420.                   nBlank = CLng(.txtBlank.Text)
  2421.                End If
  2422.                If IsNumeric(.txtMuted.Text) Then
  2423.                   nMuted = CLng(.txtMuted.Text)
  2424.                End If
  2425.                If IsNumeric(.txtMuted.Text) Then
  2426.                   nPriority = CLng(.txtMuted.Text)
  2427.                End If
  2428.                If IsNumeric(.txtStartTime.Text) Then
  2429.                   dblStartTime = CDbl(.txtStartTime.Text)
  2430.                End If
  2431.                If IsNumeric(.txtStopTime.Text) Then
  2432.                   dblStopTime = CDbl(.txtStopTime.Text)
  2433.                End If
  2434.             End With
  2435.             
  2436.             'insert the track into the timeline
  2437.             If ObjPtr(gbl_objTimeline) > 0 Then
  2438.                Set objNewTrack = CreateTrack(gbl_objTimeline)
  2439.                If ObjPtr(objNewTrack) > 0 Then Call InsertTrack(objNewTrack, gbl_objDexterObject, nPriority)
  2440.                'refresh the ide
  2441.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2442.             End If
  2443.             
  2444.             'destroy dialog
  2445.             Unload frmTrack: Set frmTrack = Nothing
  2446.             Exit Sub
  2447.             
  2448. ErrLine:
  2449.             Err.Clear
  2450.             Exit Sub
  2451.             End Sub
  2452.             
  2453.             
  2454.             ' ******************************************************************************************************************************
  2455.             ' * procedure name: mnuGroupAddTransition_Click
  2456.             ' * procedure description:  Occurs when the group popup context menu's 'Add Transition' option is elected
  2457.             ' *
  2458.             ' ******************************************************************************************************************************
  2459.             Private Sub mnuGroupAddTransition_Click()
  2460.             Dim nCutpoint As Long
  2461.             Dim nCutsOnly As Long
  2462.             Dim nSwapInputs As Long
  2463.             Dim bstrTransition As String
  2464.             Dim dblStartTime As Double
  2465.             Dim dblStopTime As Double
  2466.             Dim objNewTransition As AMTimelineTrans
  2467.             On Local Error GoTo ErrLine
  2468.             
  2469.             'display the dialog
  2470.             frmTransitions.Caption = "Add Transition"
  2471.             frmTransitions.Show vbModal, Me
  2472.             
  2473.             'wait until the user closes the dialog
  2474.             Do Until frmTransitions.Visible = False: DoEvents
  2475.             Loop
  2476.             'verify unload mode
  2477.             If frmTransitions.UnloadMode = 1 Then
  2478.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  2479.             End If
  2480.             
  2481.             'obtain user input
  2482.             With frmTransitions
  2483.                If IsNumeric(.txtCutpoint.Text) Then
  2484.                   nCutpoint = CLng(.txtCutpoint.Text)
  2485.                End If
  2486.                If IsNumeric(.txtCutsOnly.Text) Then
  2487.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  2488.                End If
  2489.                If IsNumeric(.txtSwapInputs.Text) Then
  2490.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  2491.                End If
  2492.                If IsNumeric(.txtStartTime.Text) Then
  2493.                   dblStartTime = CDbl(.txtStartTime.Text)
  2494.                End If
  2495.                If IsNumeric(.txtStopTime.Text) Then
  2496.                   dblStopTime = CDbl(.txtStopTime.Text)
  2497.                End If
  2498.                If .cmbTransition.Text <> vbNullString Then
  2499.                   bstrTransition = CStr(.cmbTransition.Text)
  2500.                End If
  2501.             End With
  2502.             
  2503.             'insert the transition into the timeline
  2504.             If ObjPtr(gbl_objTimeline) > 0 Then
  2505.                Set objNewTransition = CreateTransition(gbl_objTimeline)
  2506.                If ObjPtr(objNewTransition) > 0 Then Call InsertTransition(objNewTransition, gbl_objDexterObject, TransitionFriendlyNameToCLSID(bstrTransition), dblStartTime, dblStopTime)
  2507.                'refresh the ide
  2508.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2509.             End If
  2510.             
  2511.             'destroy the dialog
  2512.             Unload frmTransitions: Set frmTransitions = Nothing
  2513.             Exit Sub
  2514.             
  2515. ErrLine:
  2516.             Err.Clear
  2517.             Exit Sub
  2518.             End Sub
  2519.             
  2520.             
  2521.             ' ******************************************************************************************************************************
  2522.             ' * procedure name: mnuGroupDelete_Click
  2523.             ' * procedure description:  Occurs when the group popup context menu's 'Delete' option is elected
  2524.             ' *
  2525.             ' ******************************************************************************************************************************
  2526.             Private Sub mnuGroupDelete_Click()
  2527.             Dim objGroup As AMTimelineGroup
  2528.             On Local Error GoTo ErrLine
  2529.             
  2530.             'obtain the group from the global timeline object
  2531.             'which is reset when the user clicks a node on the tree
  2532.             If ObjPtr(gbl_objDexterObject) > 0 Then
  2533.                Set objGroup = gbl_objDexterObject
  2534.             Else: Exit Sub
  2535.             End If
  2536.             
  2537.             'remove the item
  2538.             Call gbl_objDexterObject.RemoveAll
  2539.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  2540.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  2541.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  2542.             Exit Sub
  2543.             
  2544. ErrLine:
  2545.             Err.Clear
  2546.             Exit Sub
  2547.             End Sub
  2548.             
  2549.             
  2550.             ' ******************************************************************************************************************************
  2551.             ' * procedure name: mnuGroupEdit_Click
  2552.             ' * procedure description:  Occurs when the group popup context menu's 'Edit' option is elected
  2553.             ' *
  2554.             ' ******************************************************************************************************************************
  2555.             Private Sub mnuGroupEdit_Click()
  2556.             Dim nPriority As Long
  2557.             Dim nOutputBuffer As Long
  2558.             Dim nPreviewMode As Long
  2559.             Dim dblOutputFPS As Double
  2560.             Dim bstrGroupName As String
  2561.             Dim nSmartRecompDirty As Long
  2562.             Dim nSmartRecompFormat As Long
  2563.             Dim objGroup As AMTimelineGroup
  2564.             On Local Error GoTo ErrLine
  2565.             
  2566.             'obtain the group from the global timeline object
  2567.             'which is reset when the user clicks a node on the tree
  2568.             If ObjPtr(gbl_objDexterObject) > 0 Then
  2569.                Set objGroup = gbl_objDexterObject
  2570.             Else: Exit Sub
  2571.             End If
  2572.             
  2573.             'obtain existing group information
  2574.             If ObjPtr(objGroup) > 0 Then
  2575.                With objGroup
  2576.                    bstrGroupName = .GetGroupName
  2577.                   Call .GetOutputBuffering(nOutputBuffer)
  2578.                   Call .GetOutputFPS(dblOutputFPS)
  2579.                   Call .GetPreviewMode(nPreviewMode)
  2580.                   Call .GetPriority(nPriority)
  2581.                   Call .IsRecompressFormatDirty(nSmartRecompDirty)
  2582.                   Call .IsSmartRecompressFormatSet(nSmartRecompFormat)
  2583.                End With
  2584.             End If
  2585.             
  2586.             'hide the dialog
  2587.             Load frmGroup
  2588.             frmTimeline.Visible = False
  2589.             
  2590.             'update the form with the existing information
  2591.             With frmGroup
  2592.                .txtGroupName = bstrGroupName
  2593.                .txtMediaType = "?"  'feature unavailable, simply set to nullstring
  2594.                .txtPriority = nPriority
  2595.                .txtOutputFPS = dblOutputFPS
  2596.                .txtPreviewMode = nPreviewMode
  2597.                .txtBuffering = nOutputBuffer
  2598.             End With
  2599.             
  2600.             'display the dialog
  2601.             frmGroup.Caption = "Edit Group"
  2602.             frmGroup.Show vbModal, Me
  2603.             
  2604.             'wait until the user closes the dialog
  2605.             Do Until frmGroup.Visible = False: DoEvents
  2606.             Loop
  2607.             'verify unload mode
  2608.             If frmGroup.UnloadMode = 1 Then
  2609.                Unload frmGroup: Set frmGroup = Nothing: Exit Sub
  2610.             End If
  2611.             
  2612.             'update the timeline info given the new information
  2613.             With objGroup
  2614.                .SetGroupName CStr(frmGroup.txtGroupName)
  2615.                If IsNumeric(frmGroup.txtMediaType) Then
  2616.                   .SetMediaTypeForVB CLng(frmGroup.txtMediaType)
  2617.                End If
  2618.                If IsNumeric(frmGroup.txtOutputFPS) Then
  2619.                   If CDbl(frmGroup.txtOutputFPS) > 0 Then
  2620.                      .SetOutputFPS CDbl(frmGroup.txtOutputFPS)
  2621.                   End If
  2622.                End If
  2623.                If IsNumeric(frmGroup.txtPreviewMode) Then
  2624.                   .SetPreviewMode CLng(frmGroup.txtPreviewMode)
  2625.                End If
  2626.                If IsNumeric(frmGroup.txtBuffering) Then
  2627.                   If CLng(frmGroup.txtBuffering) > 0 Then
  2628.                       .SetOutputBuffering CLng(frmGroup.txtBuffering)
  2629.                   End If
  2630.                End If
  2631.             End With
  2632.             
  2633.             'refresh the ide
  2634.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2635.             
  2636.             'destroy the dialog
  2637.             Unload frmGroup: Set frmGroup = Nothing
  2638.             Exit Sub
  2639.             
  2640. ErrLine:
  2641.             Err.Clear
  2642.             Exit Sub
  2643.             End Sub
  2644.             
  2645.             
  2646.             ' ******************************************************************************************************************************
  2647.             ' * procedure name: mnuHelpAbout_Click
  2648.             ' * procedure description:  Occurs when the help menu's 'About' option is elected
  2649.             ' *
  2650.             ' ******************************************************************************************************************************
  2651.             Private Sub mnuHelpAbout_Click()
  2652.             On Local Error GoTo ErrLine
  2653.             
  2654.             'display the about dialog for the user
  2655.             frmAbout.Show 1, Me
  2656.             frmAbout.SetFocus
  2657.             Exit Sub
  2658.             
  2659. ErrLine:
  2660.             Err.Clear
  2661.             Exit Sub
  2662.             End Sub
  2663.             
  2664.             
  2665.             ' ******************************************************************************************************************************
  2666.             ' * procedure name: mnuTimeLine_Click
  2667.             ' * procedure description:  Occurs when the timeline popup context menu is invoked
  2668.             ' *
  2669.             ' ******************************************************************************************************************************
  2670.             Private Sub mnuTimeLine_Click()
  2671.             On Local Error GoTo ErrLine
  2672.             
  2673.             'set menu state
  2674.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  2675.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  2676.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2677.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2678.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  2679.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2680.                   If mnuTimelineCollapse.Enabled = False Then mnuTimelineCollapse.Enabled = True
  2681.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  2682.                   If mnuTimelineExpand.Enabled = False Then mnuTimelineExpand.Enabled = True
  2683.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2684.                Else
  2685.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2686.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2687.                End If
  2688.             End If
  2689.             Exit Sub
  2690.             
  2691. ErrLine:
  2692.             Err.Clear
  2693.             Exit Sub
  2694.             End Sub
  2695.             
  2696.             
  2697.             ' ******************************************************************************************************************************
  2698.             ' * procedure name: mnuTimelineCollapse_Click
  2699.             ' * procedure description:  Occurs when the timeline popup context menu's 'Collapse' option is elected
  2700.             ' *
  2701.             ' ******************************************************************************************************************************
  2702.             Private Sub mnuTimelineCollapse_Click()
  2703.             On Local Error GoTo ErrLine
  2704.             
  2705.             'collapse the treeview
  2706.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  2707.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  2708.                   tvwSimpleTree.SelectedItem.Expanded = False
  2709.                   If mnuTimelineExpand.Enabled = False Then mnuTimelineExpand.Enabled = True
  2710.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2711.                End If
  2712.             End If
  2713.             Exit Sub
  2714.             
  2715. ErrLine:
  2716.             Err.Clear
  2717.             Exit Sub
  2718.             End Sub
  2719.             
  2720.             
  2721.             ' ******************************************************************************************************************************
  2722.             ' * procedure name: mnuTimelineExpand_Click
  2723.             ' * procedure description:  Occurs when the timeline popup context menu's 'Expand' option is elected
  2724.             ' *
  2725.             ' ******************************************************************************************************************************
  2726.             Private Sub mnuTimelineExpand_Click()
  2727.             On Local Error GoTo ErrLine
  2728.             
  2729.             'expand the treeview
  2730.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  2731.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  2732.                   tvwSimpleTree.SelectedItem.Expanded = True
  2733.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2734.                   If mnuTimelineCollapse.Enabled = False Then mnuTimelineCollapse.Enabled = True
  2735.                End If
  2736.             End If
  2737.             Exit Sub
  2738.             
  2739. ErrLine:
  2740.             Err.Clear
  2741.             Exit Sub
  2742.             End Sub
  2743.             
  2744.             
  2745.             ' ******************************************************************************************************************************
  2746.             ' * procedure name: mnuTimeLineClearRenderEngine_Click
  2747.             ' * procedure description:  Occurs when the timeline popup context menu's 'ClearRenderEngine' option is elected
  2748.             ' *
  2749.             ' ******************************************************************************************************************************
  2750.             Private Sub mnuTimeLineClearRenderEngine_Click()
  2751.             On Local Error GoTo ErrLine
  2752.             
  2753.             'dereference & clean-up
  2754.             If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  2755.             If ObjPtr(gbl_objRenderEngine) > 0 Then Call gbl_objRenderEngine.ScrapIt
  2756.             If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  2757.             
  2758.             'disable popup context menu(s)
  2759.             If mnuTimeLineRenderTimeLine.Enabled = False Then mnuTimeLineRenderTimeLine.Enabled = True
  2760.             If mnuTimeLineClearRenderEngine.Enabled = True Then mnuTimeLineClearRenderEngine.Enabled = False
  2761.             Exit Sub
  2762.             
  2763. ErrLine:
  2764.             Err.Clear
  2765.             Exit Sub
  2766.             End Sub
  2767.             
  2768.             
  2769.             ' ******************************************************************************************************************************
  2770.             ' * procedure name: mnuTimeLineEdit_Click
  2771.             ' * procedure description:  Occurs when the timeline popup context menu's 'Edit' option is elected
  2772.             ' *
  2773.             ' ******************************************************************************************************************************
  2774.             Private Sub mnuTimeLineEdit_Click()
  2775.             Dim nDirty As Long
  2776.             Dim nInsertMode As Long
  2777.             Dim dblDuration As Double
  2778.             Dim nEffectsEnabled As Long
  2779.             Dim dblDefaultFPS As Double
  2780.             Dim bstrDefaultEffect As String
  2781.             Dim nTransitionsEnabled As Long
  2782.             Dim bstrDefaultTransition As String
  2783.             On Local Error GoTo ErrLine
  2784.             
  2785.             'obtain existing timeline information
  2786.             If ObjPtr(gbl_objTimeline) > 0 Then
  2787.                With gbl_objTimeline
  2788.                   .GetInsertMode nInsertMode
  2789.                   .TransitionsEnabled nTransitionsEnabled
  2790.                   .EffectsEnabled nEffectsEnabled
  2791.                   .GetDefaultFPS dblDefaultFPS
  2792.                   .IsDirty nDirty
  2793.                   bstrDefaultTransition = .GetDefaultTransitionB
  2794.                   bstrDefaultEffect = .GetDefaultEffectB
  2795.                End With
  2796.             End If
  2797.             
  2798.             'hide the dialog
  2799.             Load frmTimeline
  2800.             frmTimeline.Visible = False
  2801.             
  2802.             'update the form with the existing information
  2803.             With frmTimeline
  2804.                .txtInsertMode.Text = CStr(nInsertMode)
  2805.                .txtTransitionsEnabled.Text = CStr(nTransitionsEnabled)
  2806.                .txtEffectsEnabled.Text = CStr(nEffectsEnabled)
  2807.                .txtDuration.Text = CStr(dblDuration)
  2808.                .txtDefaultFPS.Text = CStr(dblDefaultFPS)
  2809.                .txtDirty.Text = CStr(nDirty)
  2810.                .cmbDefaultTransition.Text = CStr(TransitionCLSIDToFriendlyName(bstrDefaultTransition))
  2811.                .cmbDefaultEffect.Text = CStr(EffectCLSIDToFriendlyName(bstrDefaultEffect))
  2812.             End With
  2813.             
  2814.             'display the dialog
  2815.             frmTimeline.Caption = "Edit Timeline"
  2816.             frmTimeline.txtDuration.Enabled = False
  2817.             frmTimeline.Show vbModal, Me
  2818.             
  2819.             'wait until the user closes the dialog
  2820.             Do Until frmTimeline.Visible = False: DoEvents
  2821.             Loop
  2822.             'determine if they canceled out
  2823.             If frmTimeline.UnloadMode = 1 Then
  2824.                Unload frmTimeline: Set frmTimeline = Nothing: Exit Sub
  2825.             End If
  2826.             
  2827.             'update the timeline info given the new information
  2828.             With gbl_objTimeline
  2829.                If IsNumeric(frmTimeline.txtTransitionsEnabled.Text) Then
  2830.                   .EnableTransitions CLng(frmTimeline.txtTransitionsEnabled.Text)
  2831.                End If
  2832.                If IsNumeric(frmTimeline.txtEffectsEnabled.Text) Then
  2833.                   .EnableEffects CLng(frmTimeline.txtEffectsEnabled.Text)
  2834.                End If
  2835.                If IsNumeric(frmTimeline.txtDefaultFPS.Text) Then
  2836.                   .SetDefaultFPS CDbl(frmTimeline.txtDefaultFPS.Text)
  2837.                End If
  2838.                If TransitionFriendlyNameToCLSID(frmTimeline.cmbDefaultTransition.Text) <> vbNullString Then
  2839.                .SetDefaultTransitionB CStr(TransitionFriendlyNameToCLSID(frmTimeline.cmbDefaultTransition.Text))
  2840.                End If
  2841.                If EffectFriendlyNameToCLSID(frmTimeline.cmbDefaultEffect.Text) <> vbNullString Then
  2842.                   .SetDefaultEffectB CStr(EffectFriendlyNameToCLSID(frmTimeline.cmbDefaultEffect.Text))
  2843.                End If
  2844.             End With
  2845.             
  2846.             'refresh the ide
  2847.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2848.             
  2849.             'destroy the dialog
  2850.             Unload frmTimeline: Set frmTimeline = Nothing
  2851.             Exit Sub
  2852.             
  2853. ErrLine:
  2854.             Err.Clear
  2855.             Exit Sub
  2856.             End Sub
  2857.             
  2858.             
  2859.             ' ******************************************************************************************************************************
  2860.             ' * procedure name: mnuTimeLineInsertGroup_Click
  2861.             ' * procedure description:  Occurs when the timeline popup context menu's 'Insert Group' option is elected
  2862.             ' *
  2863.             ' ******************************************************************************************************************************
  2864.             Private Sub mnuTimeLineInsertGroup_Click()
  2865.             Dim nPriority As Long
  2866.             Dim nBuffering As Long
  2867.             Dim nMediaType As Long
  2868.             Dim dblOutputFPS As Double
  2869.             Dim nPreviewMode As Long
  2870.             Dim bstrGroupName As String
  2871.             Dim objNewGroup As AMTimelineGroup
  2872.             On Local Error GoTo ErrLine
  2873.             
  2874.             'display the dialog
  2875.             frmGroup.Caption = "Insert Group"
  2876.             Call frmGroup.Show(vbModal, Me)
  2877.             
  2878.             'wait until the user closes the dialog
  2879.             Do Until frmGroup.Visible = False: DoEvents
  2880.             Loop
  2881.             'verify unload mode
  2882.             If frmGroup.UnloadMode = 1 Then
  2883.                Unload frmGroup: Set frmGroup = Nothing: Exit Sub
  2884.             End If
  2885.             
  2886.             'obtain the values the user entered into the dialog
  2887.             With frmGroup
  2888.                If IsNumeric(.txtPriority.Text) Then
  2889.                   nPriority = CLng(.txtPriority.Text)
  2890.                End If
  2891.                If IsNumeric(.txtBuffering.Text) Then
  2892.                   nBuffering = CLng(.txtBuffering.Text)
  2893.                End If
  2894.                If IsNumeric(.txtMediaType.Text) Then
  2895.                   nMediaType = CLng(.txtMediaType.Text)
  2896.                End If
  2897.                If IsNumeric(.txtOutputFPS.Text) Then
  2898.                   dblOutputFPS = CDbl(.txtOutputFPS.Text)
  2899.                End If
  2900.                If IsNumeric(.txtPreviewMode.Text) Then
  2901.                   nPreviewMode = CLng(.txtPreviewMode.Text)
  2902.                End If
  2903.                If .txtGroupName.Text <> vbNullString Then
  2904.                   bstrGroupName = CStr(.txtGroupName.Text)
  2905.                End If
  2906.             End With
  2907.             
  2908.             'insert the new group into the application timeline
  2909.             Set objNewGroup = _
  2910.             CreateGroup(gbl_objTimeline, bstrGroupName, nMediaType, dblOutputFPS, nPreviewMode, nBuffering)
  2911.             If ObjPtr(objNewGroup) > 0 Then Call InsertGroup(gbl_objTimeline, objNewGroup)
  2912.             
  2913.             'refresh ide
  2914.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2915.             
  2916.             'unload the dialog
  2917.             Unload frmGroup: Set frmGroup = Nothing
  2918.             Exit Sub
  2919.             
  2920. ErrLine:
  2921.             Err.Clear
  2922.             Exit Sub
  2923.             End Sub
  2924.             
  2925.             
  2926.             ' ******************************************************************************************************************************
  2927.             ' * procedure name: mnuTimeLinePause_Click
  2928.             ' * procedure description:  Occurs when the timeline popup context menu's 'Pause' option is elected
  2929.             ' *
  2930.             ' ******************************************************************************************************************************
  2931.             Private Sub mnuTimelinePause_Click()
  2932.             On Local Error GoTo ErrLine
  2933.             
  2934.             'dupe the funtionality of a 'pause' button click
  2935.             Call tbMain_ButtonClick(tbMain.Buttons("Pause"))
  2936.             Exit Sub
  2937.             
  2938. ErrLine:
  2939.             Err.Clear
  2940.             Exit Sub
  2941.             End Sub
  2942.             
  2943.             
  2944.             ' ******************************************************************************************************************************
  2945.             ' * procedure name: mnuTimeLinePlay_Click
  2946.             ' * procedure description:  Occurs when the timeline popup context menu's 'Play' option is elected
  2947.             ' *
  2948.             ' ******************************************************************************************************************************
  2949.             Private Sub mnuTimelinePlay_Click()
  2950.             On Local Error GoTo ErrLine
  2951.             
  2952.             'dupe the funtionality of a 'play' button click
  2953.             Call tbMain_ButtonClick(tbMain.Buttons("Play"))
  2954.             Exit Sub
  2955.             
  2956. ErrLine:
  2957.             Err.Clear
  2958.             Exit Sub
  2959.             End Sub
  2960.             
  2961.             
  2962.             ' ******************************************************************************************************************************
  2963.             ' * procedure name: mnuTimeLineRenderTimeLine_Click
  2964.             ' * procedure description:  Occurs when the timeline popup context menu's 'RenderTimeline' option is elected
  2965.             ' *
  2966.             ' ******************************************************************************************************************************
  2967.             Private Sub mnuTimeLineRenderTimeLine_Click()
  2968.             On Local Error GoTo ErrLine
  2969.             
  2970.             'refresh ide
  2971.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2972.             
  2973.             'connect front end
  2974.             Call gbl_objRenderEngine.ConnectFrontEnd
  2975.             
  2976.             'enable/disable popup context menu's
  2977.             mnuTimeLineRenderTimeLine.Enabled = False
  2978.             mnuTimeLineClearRenderEngine.Enabled = True
  2979.             Exit Sub
  2980.             
  2981. ErrLine:
  2982.             Err.Clear
  2983.             Exit Sub
  2984.             End Sub
  2985.             
  2986.             
  2987.             ' ******************************************************************************************************************************
  2988.             ' * procedure name: mnuTimeLineStop_Click
  2989.             ' * procedure description:  Occurs when the timeline popup context menu's 'Stop' option is elected
  2990.             ' *
  2991.             ' ******************************************************************************************************************************
  2992.             Private Sub mnuTimelineStop_Click()
  2993.             On Local Error GoTo ErrLine
  2994.             
  2995.             'dupe the funtionality of a 'stop' button click
  2996.             Call tbMain_ButtonClick(tbMain.Buttons("Stop"))
  2997.             Exit Sub
  2998.             
  2999. ErrLine:
  3000.             Err.Clear
  3001.             Exit Sub
  3002.             End Sub
  3003.             
  3004.             
  3005.             ' ******************************************************************************************************************************
  3006.             ' * procedure name: mnuTrack_Click
  3007.             ' * procedure description:  Occurs when the track popup context menu is invoked
  3008.             ' *
  3009.             ' ******************************************************************************************************************************
  3010.             Private Sub mnuTrack_Click()
  3011.             On Local Error GoTo ErrLine
  3012.             
  3013.             'set menu state
  3014.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  3015.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  3016.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  3017.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  3018.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  3019.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  3020.                   If mnuTrackCollapse.Enabled = False Then mnuTrackCollapse.Enabled = True
  3021.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  3022.                   If mnuTrackExpand.Enabled = False Then mnuTrackExpand.Enabled = True
  3023.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  3024.                Else
  3025.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  3026.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  3027.                End If
  3028.             End If
  3029.             Exit Sub
  3030.             
  3031. ErrLine:
  3032.             Err.Clear
  3033.             Exit Sub
  3034.             End Sub
  3035.             
  3036.             
  3037.             ' ******************************************************************************************************************************
  3038.             ' * procedure name: mnuTrackCollapse_Click
  3039.             ' * procedure description:  Occurs when the track popup context menu's 'Collapse' option is elected
  3040.             ' *
  3041.             ' ******************************************************************************************************************************
  3042.             Private Sub mnuTrackCollapse_Click()
  3043.             On Local Error GoTo ErrLine
  3044.             
  3045.             'collapse the treeview
  3046.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  3047.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  3048.                   tvwSimpleTree.SelectedItem.Expanded = False
  3049.                   If mnuTrackExpand.Enabled = False Then mnuTrackExpand.Enabled = True
  3050.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  3051.                End If
  3052.             End If
  3053.             Exit Sub
  3054.             
  3055. ErrLine:
  3056.             Err.Clear
  3057.             Exit Sub
  3058.             End Sub
  3059.             
  3060.             
  3061.             ' ******************************************************************************************************************************
  3062.             ' * procedure name: mnuTrackExpand_Click
  3063.             ' * procedure description:  Occurs when the track popup context menu's 'Expand' option is elected
  3064.             ' *
  3065.             ' ******************************************************************************************************************************
  3066.             Private Sub mnuTrackExpand_Click()
  3067.             On Local Error GoTo ErrLine
  3068.             
  3069.             'expand the treeview
  3070.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  3071.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  3072.                   tvwSimpleTree.SelectedItem.Expanded = True
  3073.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  3074.                   If mnuTrackCollapse.Enabled = False Then mnuTrackCollapse.Enabled = True
  3075.                End If
  3076.             End If
  3077.             Exit Sub
  3078.             
  3079. ErrLine:
  3080.             Err.Clear
  3081.             Exit Sub
  3082.             End Sub
  3083.             
  3084.             
  3085.             ' ******************************************************************************************************************************
  3086.             ' * procedure name: mnuTrackAddClip_Click
  3087.             ' * procedure description:  Occurs when the track popup context menu's 'Add Clip' option is elected
  3088.             ' *
  3089.             ' ******************************************************************************************************************************
  3090.             Private Sub mnuTrackAddClip_Click()
  3091.             Dim nMuted As Long
  3092.             Dim dblFPS As Double
  3093.             Dim dblTStop As Double
  3094.             Dim dblTStart As Double
  3095.             Dim dblMStart As Double
  3096.             Dim dblMStop As Double
  3097.             Dim nStretchMode As Long
  3098.             Dim nStreamNumber As Long
  3099.             Dim dblMediaLength As Double
  3100.             Dim bstrMediaSourceName As String
  3101.             Dim objNewSourceClip As AMTimelineSrc
  3102.             On Local Error GoTo ErrLine
  3103.             
  3104.             'display the dialog
  3105.             frmClip.Caption = "Add Clip"
  3106.             frmClip.Show vbModal, Me
  3107.             
  3108.             'wait until the user closes the dialog
  3109.             Do Until frmClip.Visible = False: DoEvents
  3110.             Loop
  3111.             'verify unload mode
  3112.             If frmClip.UnloadMode = 1 Then
  3113.                Unload frmClip: Set frmClip = Nothing: Exit Sub
  3114.             End If
  3115.             
  3116.             'obtain the user input from the dialog
  3117.             With frmClip
  3118.                If IsNumeric(.txtMStart.Text) Then
  3119.                   dblMStart = CDbl(.txtMStart.Text)
  3120.                End If
  3121.                If IsNumeric(.txtTStop.Text) Then
  3122.                   dblMStop = CDbl(.txtTStop.Text)
  3123.                End If
  3124.                If IsNumeric(.txtTStart.Text) Then
  3125.                   dblTStart = CDbl(.txtTStart.Text)
  3126.                End If
  3127.                If IsNumeric(.txtTStop.Text) Then
  3128.                   dblTStop = CDbl(.txtTStop.Text)
  3129.                End If
  3130.                If IsNumeric(.txtMediaLength.Text) Then
  3131.                   dblMediaLength = CDbl(.txtMediaLength.Text)
  3132.                End If
  3133.                If IsNumeric(.txtStreamNumber.Text) Then
  3134.                   nStreamNumber = CLng(.txtStreamNumber.Text)
  3135.                End If
  3136.                If IsNumeric(.txtFPS.Text) Then
  3137.                   dblFPS = CDbl(.txtFPS.Text)
  3138.                End If
  3139.                If IsNumeric(.txtStretchMode.Text) Then
  3140.                   nStretchMode = CLng(.txtStretchMode.Text)
  3141.                End If
  3142.                If IsNumeric(.txtMuted.Text) Then
  3143.                   nMuted = CLng(.txtMuted.Text)
  3144.                End If
  3145.                If .txtMediaName <> vbNullString Then
  3146.                   bstrMediaSourceName = CStr(.txtMediaName)
  3147.                End If
  3148.             End With
  3149.             
  3150.             'insert the new clip into the timeline
  3151.             If ObjPtr(gbl_objTimeline) > 0 Then
  3152.                Set objNewSourceClip = CreateSource(gbl_objTimeline)
  3153.                If ObjPtr(objNewSourceClip) > 0 Then Call InsertSource(gbl_objDexterObject, objNewSourceClip, bstrMediaSourceName, dblTStart, dblTStop, dblMStart, dblMStop)
  3154.                If ObjPtr(objNewSourceClip) > 0 Then
  3155.                   'refresh the ide
  3156.                   Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3157.                   'update the button(s)
  3158.                   With tbMain.Buttons
  3159.                      .Item("Play").Image = 6
  3160.                      .Item("Pause").Image = 7
  3161.                      .Item("Stop").Image = 22
  3162.                      .Item("Rewind").Image = 18
  3163.                      .Item("FastForward").Image = 24
  3164.                      .Item("SeekForward").Image = 23
  3165.                      .Item("SeekBackward").Image = 19
  3166.                      .Item("Play").Enabled = True
  3167.                      .Item("Pause").Enabled = True
  3168.                      .Item("Stop").Enabled = False
  3169.                      .Item("Rewind").Enabled = False
  3170.                      .Item("FastForward").Enabled = False
  3171.                      .Item("SeekForward").Enabled = False
  3172.                      .Item("SeekBackward").Enabled = False
  3173.                   End With
  3174.                   'update the state on the popup context menu
  3175.                   mnuTimeLinePlay.Enabled = True
  3176.                   mnuTimeLineStop.Enabled = False
  3177.                   mnuTimeLinePause.Enabled = False
  3178.                   mnuTimeLineRenderTimeLine.Enabled = True
  3179.                   mnuTimeLineClearRenderEngine.Enabled = True
  3180.                End If
  3181.             End If
  3182.             
  3183.             'destroy dialog
  3184.             Unload frmClip: Set frmClip = Nothing
  3185.             Exit Sub
  3186.             
  3187. ErrLine:
  3188.             Err.Clear
  3189.             Exit Sub
  3190.             End Sub
  3191.             
  3192.             
  3193.             ' ******************************************************************************************************************************
  3194.             ' * procedure name: mnuTrackAddEffect_Click
  3195.             ' * procedure description:  Occurs when the track popup context menu's 'Add Effect' option is elected
  3196.             ' *
  3197.             ' ******************************************************************************************************************************
  3198.             Private Sub mnuTrackAddEffect_Click()
  3199.             Dim nEffectPriority As Long
  3200.             Dim bstrEffectGUID As String
  3201.             Dim dblEffectStopTime As Double
  3202.             Dim dblEffectStartTime As Double
  3203.             Dim objNewEffect As AMTimelineEffect
  3204.             Dim objTimelineObject As AMTimelineObj
  3205.             On Local Error GoTo ErrLine
  3206.             
  3207.             'display the insert effect dialog
  3208.             frmEffect.Caption = "Add Effect"
  3209.             frmEffect.Show vbModal, Me
  3210.             
  3211.             'wait until the user closes the dialog
  3212.             Do: DoEvents
  3213.             If frmEffect.Visible = False Then Exit Do
  3214.             Loop
  3215.             'verify unload mode
  3216.             If frmEffect.UnloadMode = 1 Then
  3217.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  3218.             End If
  3219.             
  3220.             'query the dialog information
  3221.             With frmEffect
  3222.                If IsNumeric(.txtStartTime.Text) Then
  3223.                   dblEffectStartTime = CDbl(.txtStartTime.Text)
  3224.                End If
  3225.                If IsNumeric(.txtStopTime.Text) Then
  3226.                   dblEffectStopTime = CDbl(.txtStopTime.Text)
  3227.                End If
  3228.                If IsNumeric(.txtPriority.Text) Then
  3229.                   nEffectPriority = CLng(.txtPriority.Text)
  3230.                End If
  3231.                If .cmbEffect.Text <> vbNullString Then
  3232.                   bstrEffectGUID = CStr(.cmbEffect.Text)
  3233.                End If
  3234.             End With
  3235.             
  3236.             'insert the effect into the timeline
  3237.             If ObjPtr(gbl_objTimeline) > 0 Then
  3238.                Set objNewEffect = CreateEffect(gbl_objTimeline)
  3239.                If ObjPtr(objNewEffect) > 0 Then Call InsertEffect(objNewEffect, gbl_objDexterObject, EffectFriendlyNameToCLSID(bstrEffectGUID), dblEffectStartTime, dblEffectStopTime)
  3240.                'refresh the ide
  3241.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3242.             End If
  3243.             
  3244.             'destroy the dialog
  3245.             Unload frmEffect: Set frmEffect = Nothing
  3246.             Exit Sub
  3247.             
  3248. ErrLine:
  3249.             Err.Clear
  3250.             Exit Sub
  3251.             End Sub
  3252.             
  3253.             
  3254.             ' ******************************************************************************************************************************
  3255.             ' * procedure name: mnuTrackAddTransition_Click
  3256.             ' * procedure description:  Occurs when the track popup context menu's 'Add Transition' option is elected
  3257.             ' *
  3258.             ' ******************************************************************************************************************************
  3259.             Private Sub mnuTrackAddTransition_Click()
  3260.             Dim nCutpoint As Long
  3261.             Dim nCutsOnly As Long
  3262.             Dim nSwapInputs As Long
  3263.             Dim bstrTransition As String
  3264.             Dim dblStartTime As Double
  3265.             Dim dblStopTime As Double
  3266.             Dim objNewTransition As AMTimelineTrans
  3267.             On Local Error GoTo ErrLine
  3268.             
  3269.             'display the dialog
  3270.             frmTransitions.Caption = "Add Transition"
  3271.             frmTransitions.Show vbModal, Me
  3272.             
  3273.             'wait until the user closes the dialog
  3274.             Do Until frmTransitions.Visible = False: DoEvents
  3275.             Loop
  3276.             'verify unload mode
  3277.             If frmTransitions.UnloadMode = 1 Then
  3278.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  3279.             End If
  3280.             
  3281.             'obtain user input
  3282.             With frmTransitions
  3283.                If IsNumeric(.txtCutpoint.Text) Then
  3284.                   nCutpoint = CLng(.txtCutpoint.Text)
  3285.                End If
  3286.                If IsNumeric(.txtCutsOnly.Text) Then
  3287.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  3288.                End If
  3289.                If IsNumeric(.txtSwapInputs.Text) Then
  3290.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  3291.                End If
  3292.                If IsNumeric(.txtStartTime.Text) Then
  3293.                   dblStartTime = CDbl(.txtStartTime.Text)
  3294.                End If
  3295.                If IsNumeric(.txtStopTime.Text) Then
  3296.                   dblStopTime = CDbl(.txtStopTime.Text)
  3297.                End If
  3298.                If .cmbTransition.Text <> vbNullString Then
  3299.                   bstrTransition = CStr(.cmbTransition.Text)
  3300.                End If
  3301.             End With
  3302.             
  3303.             'insert the transition into the timeline
  3304.             If ObjPtr(gbl_objTimeline) > 0 Then
  3305.                Set objNewTransition = CreateTransition(gbl_objTimeline)
  3306.                If ObjPtr(objNewTransition) > 0 Then Call InsertTransition(objNewTransition, gbl_objDexterObject, TransitionFriendlyNameToCLSID(bstrTransition), dblStartTime, dblStopTime)
  3307.                'refresh the ide
  3308.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3309.             End If
  3310.             
  3311.             'destroy the dialog
  3312.             Unload frmTransitions: Set frmTransitions = Nothing
  3313.             Exit Sub
  3314.             
  3315. ErrLine:
  3316.             Err.Clear
  3317.             Exit Sub
  3318.             End Sub
  3319.             
  3320.             
  3321.             ' ******************************************************************************************************************************
  3322.             ' * procedure name: mnuTrackDelete_Click
  3323.             ' * procedure description:  Occurs when the track popup context menu's 'Delete' option is elected
  3324.             ' *
  3325.             ' ******************************************************************************************************************************
  3326.             Private Sub mnuTrackDelete_Click()
  3327.             Dim objTrack As AMTimelineTrack
  3328.             On Local Error GoTo ErrLine
  3329.             
  3330.             'obtain the track from the global timeline object
  3331.             'which is reset when the user clicks a node on the tree
  3332.             If ObjPtr(gbl_objDexterObject) > 0 Then
  3333.                Set objTrack = gbl_objDexterObject
  3334.             Else: Exit Sub
  3335.             End If
  3336.             
  3337.             'remove the item
  3338.             Call gbl_objDexterObject.RemoveAll
  3339.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  3340.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  3341.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  3342.             
  3343.             'clean-up & dereference
  3344.             If ObjPtr(objTrack) > 0 Then Set objTrack = Nothing
  3345.             Exit Sub
  3346.             
  3347. ErrLine:
  3348.             Err.Clear
  3349.             Exit Sub
  3350.             End Sub
  3351.             
  3352.             
  3353.             ' ******************************************************************************************************************************
  3354.             ' * procedure name: mnuTrackEdit_Click
  3355.             ' * procedure description:  Occurs when the track popup context menu's 'Edit' option is elected
  3356.             ' *
  3357.             ' ******************************************************************************************************************************
  3358.             Private Sub mnuTrackEdit_Click()
  3359.             Dim nBlank As Long
  3360.             Dim nMuted As Long
  3361.             Dim nPriority As Long
  3362.             Dim dblStopTime As Double
  3363.             Dim dblStartTime As Double
  3364.             Dim objTrack As AMTimelineTrack
  3365.             On Local Error GoTo ErrLine
  3366.             
  3367.             'obtain the track from the global timeline object
  3368.             'which is reset when the user clicks a node on the tree
  3369.             If ObjPtr(gbl_objDexterObject) > 0 Then
  3370.                Set objTrack = gbl_objDexterObject
  3371.             Else: Exit Sub
  3372.             End If
  3373.             
  3374.             'obtain existing group information
  3375.             If ObjPtr(objTrack) > 0 Then
  3376.                With objTrack
  3377.                   'get blank
  3378.                   Call objTrack.AreYouBlank(nBlank)
  3379.                   'get muted
  3380.                   Call gbl_objDexterObject.GetMuted(nMuted)
  3381.                   'get start /stoptime
  3382.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  3383.                End With
  3384.             End If
  3385.             
  3386.             'hide the dialog
  3387.             Load frmTrack
  3388.             frmTrack.Visible = False
  3389.             
  3390.             'update the form with the existing information
  3391.             With frmTrack
  3392.                .txtPriority = 0  'methodology not available
  3393.                .txtStartTime = CStr(dblStartTime)
  3394.                .txtStopTime = CStr(dblStopTime)
  3395.                .txtBlank.Text = CStr(nBlank)
  3396.                .txtMuted.Text = CStr(nMuted)
  3397.             End With
  3398.             
  3399.             'display the dialog
  3400.             frmTrack.Caption = "Edit Track"
  3401.             frmTrack.Show vbModal, Me
  3402.             
  3403.             'wait until the user closes the dialog
  3404.             Do Until frmTrack.Visible = False: DoEvents
  3405.             Loop
  3406.             'verify unload mode
  3407.             If frmTrack.UnloadMode = 1 Then
  3408.                Unload frmTrack: Set frmTrack = Nothing: Exit Sub
  3409.             End If
  3410.             
  3411.             'query the dialog information
  3412.             With frmTrack
  3413.                If IsNumeric(.txtStartTime.Text) Then
  3414.                   dblStartTime = CDbl(.txtStartTime.Text)
  3415.                End If
  3416.                If IsNumeric(.txtStopTime.Text) Then
  3417.                   dblStopTime = CDbl(.txtStopTime.Text)
  3418.                End If
  3419.                If IsNumeric(.txtPriority.Text) Then
  3420.                   nPriority = CLng(.txtPriority.Text)
  3421.                End If
  3422.                If .txtBlank.Text <> vbNullString Then
  3423.                   nBlank = CStr(.txtBlank.Text)
  3424.                End If
  3425.                If .txtMuted.Text <> vbNullString Then
  3426.                   nMuted = CStr(.txtMuted.Text)
  3427.                End If
  3428.             End With
  3429.             
  3430.             'update the timeline info given the new information
  3431.             If ObjPtr(gbl_objDexterObject) > 0 Then
  3432.                'set the muted state
  3433.                Call gbl_objDexterObject.SetMuted(nMuted)
  3434.                'set the media times
  3435.                Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  3436.             End If
  3437.             
  3438.             'refresh the ide
  3439.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3440.             
  3441.             'destroy the dialog
  3442.             Unload frmTrack: Set frmTrack = Nothing
  3443.             Exit Sub
  3444.             
  3445. ErrLine:
  3446.             Err.Clear
  3447.             Exit Sub
  3448.             End Sub
  3449.             
  3450.             
  3451.             ' ******************************************************************************************************************************
  3452.             ' * procedure name: mnuTrans_Click
  3453.             ' * procedure description:  Occurs when the transition popup context menu is invoked
  3454.             ' *
  3455.             ' ******************************************************************************************************************************
  3456.             Private Sub mnuTrans_Click()
  3457.             On Local Error GoTo ErrLine
  3458.             
  3459.             'set menu state
  3460.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  3461.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  3462.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3463.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3464.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  3465.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3466.                   If mnuTransCollapse.Enabled = False Then mnuTransCollapse.Enabled = True
  3467.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  3468.                   If mnuTransExpand.Enabled = False Then mnuTransExpand.Enabled = True
  3469.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3470.                Else
  3471.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3472.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3473.                End If
  3474.             End If
  3475.             Exit Sub
  3476.             
  3477. ErrLine:
  3478.             Err.Clear
  3479.             Exit Sub
  3480.             End Sub
  3481.             
  3482.             
  3483.             ' ******************************************************************************************************************************
  3484.             ' * procedure name: mnuTransCollapse_Click
  3485.             ' * procedure description:  Occurs when the transition popup context menu's 'Collapse' option is elected
  3486.             ' *
  3487.             ' ******************************************************************************************************************************
  3488.             Private Sub mnuTransCollapse_Click()
  3489.             On Local Error GoTo ErrLine
  3490.             
  3491.             'collapse the treeview
  3492.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  3493.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  3494.                   tvwSimpleTree.SelectedItem.Expanded = False
  3495.                   If mnuTransExpand.Enabled = False Then mnuTransExpand.Enabled = True
  3496.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3497.                End If
  3498.             End If
  3499.             Exit Sub
  3500.             
  3501. ErrLine:
  3502.             Err.Clear
  3503.             Exit Sub
  3504.             End Sub
  3505.             
  3506.             
  3507.             ' ******************************************************************************************************************************
  3508.             ' * procedure name: mnuTransExpand_Click
  3509.             ' * procedure description:  Occurs when the transition popup context menu's 'Expand' option is elected
  3510.             ' *
  3511.             ' ******************************************************************************************************************************
  3512.             Private Sub mnuTransExpand_Click()
  3513.             On Local Error GoTo ErrLine
  3514.             
  3515.             'expand the treeview
  3516.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  3517.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  3518.                   tvwSimpleTree.SelectedItem.Expanded = True
  3519.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3520.                   If mnuTransCollapse.Enabled = False Then mnuTransCollapse.Enabled = True
  3521.                End If
  3522.             End If
  3523.             Exit Sub
  3524.             
  3525. ErrLine:
  3526.             Err.Clear
  3527.             Exit Sub
  3528.             End Sub
  3529.             
  3530.             
  3531.             ' ******************************************************************************************************************************
  3532.             ' * procedure name: mnuTransDelete_Click
  3533.             ' * procedure description:  Occurs when the transition popup context menu's 'Delete' option is elected
  3534.             ' *
  3535.             ' ******************************************************************************************************************************
  3536.             Private Sub mnuTransDelete_Click()
  3537.             Dim objTransition As AMTimelineTrans
  3538.             On Local Error GoTo ErrLine
  3539.             
  3540.             'obtain the transition from the global timeline object
  3541.             'which is reset when the user clicks a node on the tree
  3542.             If ObjPtr(gbl_objDexterObject) > 0 Then
  3543.                Set objTransition = gbl_objDexterObject
  3544.             Else: Exit Sub
  3545.             End If
  3546.             'remove the item
  3547.             Call gbl_objDexterObject.RemoveAll
  3548.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  3549.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  3550.             If ObjPtr(gbl_objDexterObject) > 0 Then Set gbl_objDexterObject = Nothing
  3551.             
  3552.             'clean-up & dereference
  3553.             If ObjPtr(objTransition) > 0 Then Set objTransition = Nothing
  3554.             Exit Sub
  3555.             
  3556. ErrLine:
  3557.             Err.Clear
  3558.             Exit Sub
  3559.             End Sub
  3560.             
  3561.             
  3562.             ' ******************************************************************************************************************************
  3563.             ' * procedure name: mnuTransEdit_Click
  3564.             ' * procedure description:  Occurs when the transition popup context menu's 'Edit' option is elected
  3565.             ' *
  3566.             ' ******************************************************************************************************************************
  3567.             Private Sub mnuTransEdit_Click()
  3568.             Dim nCutsOnly As Long
  3569.             Dim nSwapInputs As Long
  3570.             Dim dblCutpoint As Double
  3571.             Dim dblStopTime As Double
  3572.             Dim dblStartTime As Double
  3573.             Dim bstrTransitionCLSID As String
  3574.             Dim objTransition As AMTimelineTrans
  3575.             On Local Error GoTo ErrLine
  3576.             
  3577.             'obtain the transition from the global timeline object
  3578.             'which is reset when the user clicks a node on the tree
  3579.             If ObjPtr(gbl_objDexterObject) > 0 Then
  3580.                Set objTransition = gbl_objDexterObject
  3581.             Else: Exit Sub
  3582.             End If
  3583.             
  3584.             'obtain existing transition information
  3585.             If ObjPtr(objTransition) > 0 Then
  3586.                With objTransition
  3587.                   'get cutpoint
  3588.                   Call .GetCutPoint2(dblCutpoint)
  3589.                   'get cutsonly
  3590.                   Call .GetCutsOnly(nCutsOnly)
  3591.                   'get swap inputs
  3592.                   Call .GetSwapInputs(nSwapInputs)
  3593.                   'get start /stoptime
  3594.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  3595.                   'get transition clsid
  3596.                   bstrTransitionCLSID = gbl_objDexterObject.GetSubObjectGUIDB
  3597.                End With
  3598.             End If
  3599.             
  3600.             'hide the dialog
  3601.             Load frmTransitions
  3602.             frmTransitions.Visible = False
  3603.             
  3604.             'update the form with the existing information
  3605.             With frmTransitions
  3606.                .txtStartTime = CStr(dblStartTime)
  3607.                .txtStopTime = CStr(dblStopTime)
  3608.                .txtCutsOnly = CStr(nCutsOnly)
  3609.                .txtCutpoint = CStr(dblCutpoint)
  3610.                .txtSwapInputs = CStr(nSwapInputs)
  3611.                .cmbTransition = CStr(TransitionCLSIDToFriendlyName(bstrTransitionCLSID))
  3612.             End With
  3613.             
  3614.             'display the dialog
  3615.             frmTransitions.Caption = "Edit Transition"
  3616.             frmTransitions.Show vbModal, Me
  3617.             
  3618.             'wait until the user closes the dialog
  3619.             Do Until frmTransitions.Visible = False: DoEvents
  3620.             Loop
  3621.             'verify unload mode
  3622.             If frmTransitions.UnloadMode = 1 Then
  3623.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  3624.             End If
  3625.             
  3626.             'query the dialog information
  3627.             With frmTransitions
  3628.                If IsNumeric(.txtStartTime.Text) Then
  3629.                   dblStartTime = CDbl(.txtStartTime.Text)
  3630.                End If
  3631.                If IsNumeric(.txtStopTime.Text) Then
  3632.                   dblStopTime = CDbl(.txtStopTime.Text)
  3633.                End If
  3634.                If IsNumeric(.txtCutpoint.Text) Then
  3635.                   dblCutpoint = CDbl(.txtCutpoint.Text)
  3636.                End If
  3637.                If IsNumeric(.txtCutsOnly.Text) Then
  3638.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  3639.                End If
  3640.                If IsNumeric(.txtSwapInputs.Text) Then
  3641.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  3642.                End If
  3643.                If .cmbTransition <> vbNullString Then
  3644.                  bstrTransitionCLSID = TransitionFriendlyNameToCLSID(CStr(.cmbTransition.Text))
  3645.                End If
  3646.             End With
  3647.             
  3648.             'update the transition info given the new information
  3649.             If ObjPtr(gbl_objDexterObject) > 0 Then
  3650.                'set the transition clsid
  3651.                Call gbl_objDexterObject.SetSubObjectGUIDB(bstrTransitionCLSID)
  3652.                'set the cutpoint
  3653.                Call objTransition.SetCutPoint2(dblCutpoint)
  3654.                'set the cutsonly
  3655.                Call objTransition.SetCutsOnly(nCutsOnly)
  3656.                'set the swap inputs
  3657.                Call objTransition.SetSwapInputs(nSwapInputs)
  3658.                'set the media times
  3659.                Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  3660.             End If
  3661.             
  3662.             'refresh the ide
  3663.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3664.             
  3665.             'destroy the dialog
  3666.             Unload frmTransitions: Set frmTransitions = Nothing
  3667.             Exit Sub
  3668.             
  3669. ErrLine:
  3670.             Err.Clear
  3671.             Exit Sub
  3672.             End Sub
  3673. ' **************************************************************************************************************************************
  3674. ' * PRIVATE INTERFACE- STATUSBAR EVENT HANDLERS
  3675.             ' ******************************************************************************************************************************
  3676.             ' * procedure name: sbStatus_MouseMove
  3677.             ' * procedure description:  Occurs when the user moves the mouse.
  3678.             ' *
  3679.             ' ******************************************************************************************************************************
  3680.             Private Sub sbStatus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3681.             On Local Error GoTo ErrLine
  3682.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  3683.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  3684.             Exit Sub
  3685.             
  3686. ErrLine:
  3687.             Err.Clear
  3688.             Exit Sub
  3689.             End Sub
  3690.             
  3691.             
  3692.             ' ******************************************************************************************************************************
  3693.             ' * procedure name: sbStatus_OLEDragDrop
  3694.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  3695.             ' *
  3696.             ' ******************************************************************************************************************************
  3697.             Private Sub sbStatus_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  3698.             Dim nCount As Long
  3699.             Dim bstrFileName As String
  3700.             Dim objLocalTimeline As AMTimeline
  3701.             On Local Error GoTo ErrLine
  3702.             
  3703.             For nCount = 1 To Data.Files.Count
  3704.                   bstrFileName = Data.Files(nCount)
  3705.                   If Len(bstrFileName) > 4 Then
  3706.                         'verify the file extension is valid
  3707.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  3708.                            'at least it's been named an xtl file, proceed to attempt an import..
  3709.                            Set objLocalTimeline = New AMTimeline
  3710.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  3711.                            'verify restoration
  3712.                            If ObjPtr(objLocalTimeline) > 0 Then
  3713.                               'import succeeded; clean-up application scope
  3714.                               If ObjPtr(gbl_objTimeline) > 0 Then
  3715.                                  'dereference & clean-up timeline
  3716.                                  Call ClearTimeline(gbl_objTimeline)
  3717.                                  Set gbl_objTimeline = Nothing
  3718.                                  'dereference & clean-up rendering
  3719.                                 If ObjPtr(gbl_objQuartzVB) > 0 Then Call gbl_objQuartzVB.StopGraph
  3720.                                 If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  3721.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Call gbl_objRenderEngine.ScrapIt
  3722.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  3723.                               End If
  3724.                               'assign the local timeline to global scope
  3725.                               Set gbl_objTimeline = objLocalTimeline
  3726.                               'render the timeline and derive a filter graph manager
  3727.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  3728.                               'map the timeline to the userinterface
  3729.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3730.                               mnuTimeLineClearRenderEngine.Enabled = False
  3731.                               'update the button(s)
  3732.                               With tbMain.Buttons
  3733.                                  .Item("Play").Image = 6
  3734.                                  .Item("Pause").Image = 7
  3735.                                  .Item("Stop").Image = 22
  3736.                                  .Item("Rewind").Image = 18
  3737.                                  .Item("FastForward").Image = 24
  3738.                                  .Item("SeekForward").Image = 23
  3739.                                  .Item("SeekBackward").Image = 19
  3740.                                  .Item("Play").Enabled = True
  3741.                                  .Item("Pause").Enabled = True
  3742.                                  .Item("Stop").Enabled = False
  3743.                                  .Item("Rewind").Enabled = False
  3744.                                  .Item("FastForward").Enabled = False
  3745.                                  .Item("SeekForward").Enabled = False
  3746.                                  .Item("SeekBackward").Enabled = False
  3747.                               End With
  3748.                               'update the state on the popup context menu
  3749.                               mnuTimeLinePlay.Enabled = True
  3750.                               mnuTimeLineStop.Enabled = False
  3751.                               mnuTimeLinePause.Enabled = True
  3752.                               mnuTimeLineRenderTimeLine.Enabled = False
  3753.                               mnuTimeLineClearRenderEngine.Enabled = False
  3754.                               'reset module-level filename
  3755.                               gbl_bstrLoadFile = Data.Files(nCount)
  3756.                               'reset the caption on the application's main form
  3757.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  3758.                               Me.Caption = "DexterVB - " & bstrFileName
  3759.                            End If
  3760.                         End If
  3761.                         'clean-up & dereference
  3762.                         If ObjPtr(objLocalTimeline) > 0 Then
  3763.                            Set objLocalTimeline = Nothing
  3764.                            Exit For
  3765.                         End If
  3766.                   End If
  3767.             Next
  3768.             Exit Sub
  3769.             
  3770. ErrLine:
  3771.             Err.Clear
  3772.             Exit Sub
  3773.             End Sub
  3774.             
  3775.             
  3776.             ' ******************************************************************************************************************************
  3777.             ' * procedure name: sbStatus_OLEDragOver
  3778.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  3779.             ' *
  3780.             ' ******************************************************************************************************************************
  3781.             Private Sub sbStatus_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  3782.             Dim nCount As Long
  3783.             Dim bstrFileName As String
  3784.             On Local Error GoTo ErrLine
  3785.             
  3786.             'do not allow drag n' drop operations when rendering..
  3787.             If ObjPtr(gbl_objQuartzVB) > 0 Then
  3788.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  3789.                   Effect = vbDropEffectNone
  3790.                   Exit Sub
  3791.                End If
  3792.             End If
  3793.             
  3794.             For nCount = 1 To Data.Files.Count
  3795.                   bstrFileName = Data.Files(nCount)
  3796.                   If Len(bstrFileName) > 4 Then
  3797.                         'verify the file extension is valid
  3798.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  3799.                            'at least it's been named an xtl file, proceed to attempt an import..
  3800.                            Effect = vbDropEffectCopy
  3801.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  3802.                         End If
  3803.                   End If
  3804.             Next
  3805.             Exit Sub
  3806.             
  3807. ErrLine:
  3808.             Err.Clear
  3809.             Exit Sub
  3810.             End Sub
  3811. ' **************************************************************************************************************************************
  3812. ' * PRIVATE INTERFACE- LISTVIEW EVENT HANDLERS
  3813.             ' ******************************************************************************************************************************
  3814.             ' * procedure name: lstViewInfo_AfterLabelEdit
  3815.             ' * procedure description:   Occurs after a user edits the label of the currently selected Node or ListItem object.
  3816.             ' *
  3817.             ' ******************************************************************************************************************************
  3818.             Private Sub lstViewInfo_AfterLabelEdit(Cancel As Integer, NewString As String)
  3819.             On Local Error GoTo ErrLine
  3820.             Cancel = 1
  3821.             Exit Sub
  3822.             
  3823. ErrLine:
  3824.             Err.Clear
  3825.             Exit Sub
  3826.             End Sub
  3827.             
  3828.             
  3829.             ' ******************************************************************************************************************************
  3830.             ' * procedure name: lstViewInfo_BeforeLabelEdit
  3831.             ' * procedure description:  Occurs when a user attempts to edit the label of the currently selected ListItem or Node object.
  3832.             ' *
  3833.             ' ******************************************************************************************************************************
  3834.             Private Sub lstViewInfo_BeforeLabelEdit(Cancel As Integer)
  3835.             On Local Error GoTo ErrLine
  3836.             Cancel = 1
  3837.             Exit Sub
  3838.             
  3839. ErrLine:
  3840.             Err.Clear
  3841.             Exit Sub
  3842.             End Sub
  3843.             
  3844.             
  3845.             ' ******************************************************************************************************************************
  3846.             ' * procedure name: lstViewInfo_Click
  3847.             ' * procedure description:  Occurs when the user presses and then releases a mouse button over an object.
  3848.             ' *
  3849.             ' ******************************************************************************************************************************
  3850.             Private Sub lstViewInfo_Click()
  3851.             On Local Error GoTo ErrLine
  3852.             lstViewInfo.SetFocus
  3853.             Exit Sub
  3854.             
  3855. ErrLine:
  3856.             Err.Clear
  3857.             Exit Sub
  3858.             End Sub
  3859.             
  3860.             
  3861.             ' ******************************************************************************************************************************
  3862.             ' * procedure name: lstViewInfo_ColumnClick
  3863.             ' * procedure description:  Occurs when a ColumnHeader object in a ListView control is clicked.
  3864.             ' *
  3865.             ' ******************************************************************************************************************************
  3866.             Private Sub lstViewInfo_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
  3867.             On Local Error GoTo ErrLine
  3868.             
  3869.             'sort listview contents by given column
  3870.             If ColumnHeader.Key = "Parameter" Then
  3871.                If lstViewInfo.Sorted = False Then lstViewInfo.Sorted = True
  3872.                If lstViewInfo.SortKey <> 0 Then lstViewInfo.SortKey = 0
  3873.                If lstViewInfo.SortOrder <> lvwAscending Then lstViewInfo.SortOrder = lvwAscending
  3874.             ElseIf ColumnHeader.Key = "Value" Then
  3875.                If lstViewInfo.Sorted = False Then lstViewInfo.Sorted = True
  3876.                If lstViewInfo.SortKey <> 1 Then lstViewInfo.SortKey = 1
  3877.                If lstViewInfo.SortOrder <> lvwAscending Then lstViewInfo.SortOrder = lvwAscending
  3878.             End If
  3879.             Exit Sub
  3880.             
  3881. ErrLine:
  3882.             Err.Clear
  3883.             Exit Sub
  3884.             End Sub
  3885.             
  3886.             
  3887.             ' ******************************************************************************************************************************
  3888.             ' * procedure name: lstViewInfo_GotFocus
  3889.             ' * procedure description:  Occurs when an object receives the focus.
  3890.             ' *
  3891.             ' ******************************************************************************************************************************
  3892.             Private Sub lstViewInfo_GotFocus()
  3893.             On Local Error GoTo ErrLine
  3894.             'reset the tooltip text
  3895.             lstViewInfo.ToolTipText = vbNullString
  3896.             Exit Sub
  3897.             
  3898. ErrLine:
  3899.             Err.Clear
  3900.             Exit Sub
  3901.             End Sub
  3902.             
  3903.             
  3904.             ' ******************************************************************************************************************************
  3905.             ' * procedure name: lstViewInfo_ItemClick
  3906.             ' * procedure description:  Occurs when a ListItem object is clicked or selected
  3907.             ' *
  3908.             ' ******************************************************************************************************************************
  3909.             Private Sub lstViewInfo_ItemClick(ByVal Item As MSComctlLib.ListItem)
  3910.             On Local Error GoTo ErrLine
  3911.             
  3912.             'display a tooltip for the item
  3913.             If ObjPtr(Item) > 0 Then
  3914.                If Item.ListSubItems.Count > 0 Then
  3915.                   If Trim(Item.SubItems(1)) <> vbNullString Then
  3916.                   lstViewInfo.ToolTipText = CStr(Trim(Item.Text) & " = " & Chr(34) & Trim(Item.SubItems(1)) & Chr(34))
  3917.                   Else: lstViewInfo.ToolTipText = vbNullString
  3918.                   End If
  3919.                Else: lstViewInfo.ToolTipText = CStr(Item.Text)
  3920.                End If
  3921.             End If
  3922.             Exit Sub
  3923.             
  3924. ErrLine:
  3925.             Err.Clear
  3926.             Exit Sub
  3927.             End Sub
  3928.             
  3929.             
  3930.             ' ******************************************************************************************************************************
  3931.             ' * procedure name: lstViewInfo_LostFocus
  3932.             ' * procedure description:  Occurs when an object loses the focus.
  3933.             ' *
  3934.             ' ******************************************************************************************************************************
  3935.             Private Sub lstViewInfo_LostFocus()
  3936.             On Local Error GoTo ErrLine
  3937.             'reset the tooltip text
  3938.             lstViewInfo.ToolTipText = vbNullString
  3939.             Exit Sub
  3940.             
  3941. ErrLine:
  3942.             Err.Clear
  3943.             Exit Sub
  3944.             End Sub
  3945.             
  3946.             
  3947.             ' ******************************************************************************************************************************
  3948.             ' * procedure name: lstViewInfo_MouseDown
  3949.             ' * procedure description:  Occurs when the user presses the mouse button while an object has the focus.
  3950.             ' *
  3951.             ' ******************************************************************************************************************************
  3952.             Private Sub lstViewInfo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3953.             On Local Error GoTo ErrLine
  3954.             'reset the tooltip text
  3955.             lstViewInfo.ToolTipText = vbNullString
  3956.             Exit Sub
  3957.             
  3958. ErrLine:
  3959.             Err.Clear
  3960.             Exit Sub
  3961.             End Sub
  3962.             
  3963.             
  3964.             ' ******************************************************************************************************************************
  3965.             ' * procedure name: lstViewInfo_MouseMove
  3966.             ' * procedure description:  Occurs when the user moves the mouse.
  3967.             ' *
  3968.             ' ******************************************************************************************************************************
  3969.             Private Sub lstViewInfo_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3970.             On Local Error GoTo ErrLine
  3971.             
  3972.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  3973.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  3974.             
  3975.             'disable tooltip if a hittest on the current position fails
  3976.             If ObjPtr(lstViewInfo.HitTest(X, Y)) = 0 Then lstViewInfo.ToolTipText = vbNullString
  3977.             Exit Sub
  3978.             
  3979. ErrLine:
  3980.             Err.Clear
  3981.             Exit Sub
  3982.             End Sub
  3983.             
  3984.             
  3985.             ' ******************************************************************************************************************************
  3986.             ' * procedure name: lstViewInfo_OLEDragDrop
  3987.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  3988.             ' *
  3989.             ' ******************************************************************************************************************************
  3990.             Private Sub lstViewInfo_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  3991.             Dim nCount As Long
  3992.             Dim bstrFileName As String
  3993.             Dim objLocalTimeline As AMTimeline
  3994.             On Local Error GoTo ErrLine
  3995.             
  3996.             For nCount = 1 To Data.Files.Count
  3997.                   bstrFileName = Data.Files(nCount)
  3998.                   If Len(bstrFileName) > 4 Then
  3999.                         'verify the file extension is valid
  4000.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4001.                            'at least it's been named an xtl file, proceed to attempt an import..
  4002.                            Set objLocalTimeline = New AMTimeline
  4003.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  4004.                            'verify restoration
  4005.                            If ObjPtr(objLocalTimeline) > 0 Then
  4006.                               'import succeeded; clean-up application scope
  4007.                               If ObjPtr(gbl_objTimeline) > 0 Then
  4008.                                  'dereference & clean-up timeline
  4009.                                  Call ClearTimeline(gbl_objTimeline)
  4010.                                  Set gbl_objTimeline = Nothing
  4011.                                  'dereference & clean-up rendering
  4012.                                 If ObjPtr(gbl_objQuartzVB) > 0 Then Call gbl_objQuartzVB.StopGraph
  4013.                                 If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  4014.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Call gbl_objRenderEngine.ScrapIt
  4015.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  4016.                               End If
  4017.                               'assign the local timeline to global scope
  4018.                               Set gbl_objTimeline = objLocalTimeline
  4019.                               'render the timeline and derive a filter graph manager
  4020.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  4021.                               'map the timeline to the userinterface
  4022.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  4023.                               mnuTimeLineClearRenderEngine.Enabled = False
  4024.                               'update the button(s)
  4025.                               With tbMain.Buttons
  4026.                                  .Item("Play").Image = 6
  4027.                                  .Item("Pause").Image = 7
  4028.                                  .Item("Stop").Image = 22
  4029.                                  .Item("Rewind").Image = 18
  4030.                                  .Item("FastForward").Image = 24
  4031.                                  .Item("SeekForward").Image = 23
  4032.                                  .Item("SeekBackward").Image = 19
  4033.                                  .Item("Play").Enabled = True
  4034.                                  .Item("Pause").Enabled = True
  4035.                                  .Item("Stop").Enabled = False
  4036.                                  .Item("Rewind").Enabled = False
  4037.                                  .Item("FastForward").Enabled = False
  4038.                                  .Item("SeekForward").Enabled = False
  4039.                                  .Item("SeekBackward").Enabled = False
  4040.                               End With
  4041.                               'update the state on the popup context menu
  4042.                               mnuTimeLinePlay.Enabled = True
  4043.                               mnuTimeLineStop.Enabled = False
  4044.                               mnuTimeLinePause.Enabled = True
  4045.                               mnuTimeLineRenderTimeLine.Enabled = False
  4046.                               mnuTimeLineClearRenderEngine.Enabled = False
  4047.                               'reset module-level filename
  4048.                               gbl_bstrLoadFile = Data.Files(nCount)
  4049.                               'reset the caption on the application's main form
  4050.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  4051.                               Me.Caption = "DexterVB - " & bstrFileName
  4052.                            End If
  4053.                         End If
  4054.                         'clean-up & dereference
  4055.                         If ObjPtr(objLocalTimeline) > 0 Then
  4056.                            Set objLocalTimeline = Nothing
  4057.                            Exit For
  4058.                         End If
  4059.                   End If
  4060.             Next
  4061.             Exit Sub
  4062.             
  4063. ErrLine:
  4064.             Err.Clear
  4065.             Exit Sub
  4066.             End Sub
  4067.             
  4068.             
  4069.             ' ******************************************************************************************************************************
  4070.             ' * procedure name: lstViewInfo_OLEDragOver
  4071.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4072.             ' *
  4073.             ' ******************************************************************************************************************************
  4074.             Private Sub lstViewInfo_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4075.             Dim nCount As Long
  4076.             Dim bstrFileName As String
  4077.             On Local Error GoTo ErrLine
  4078.             
  4079.             'do not allow drag n' drop operations when rendering..
  4080.             If ObjPtr(gbl_objQuartzVB) > 0 Then
  4081.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  4082.                   Effect = vbDropEffectNone
  4083.                   Exit Sub
  4084.                End If
  4085.             End If
  4086.             
  4087.             For nCount = 1 To Data.Files.Count
  4088.                   bstrFileName = Data.Files(nCount)
  4089.                   If Len(bstrFileName) > 4 Then
  4090.                         'verify the file extension is valid
  4091.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4092.                            'at least it's been named an xtl file, proceed to attempt an import..
  4093.                            Effect = vbDropEffectCopy
  4094.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  4095.                         End If
  4096.                   End If
  4097.             Next
  4098.             Exit Sub
  4099.             
  4100. ErrLine:
  4101.             Err.Clear
  4102.             Exit Sub
  4103.             End Sub
  4104. ' **************************************************************************************************************************************
  4105. ' * PRIVATE INTERFACE- TREEVIEW EVENT HANDLERS
  4106.             ' ******************************************************************************************************************************
  4107.             ' * procedure name: tvwSimpleTree_AfterLabelEdit
  4108.             ' * procedure description:  Occurs after a user edits the label of the currently selected Node or ListItem object.
  4109.             ' *
  4110.             ' ******************************************************************************************************************************
  4111.             Private Sub tvwSimpleTree_AfterLabelEdit(Cancel As Integer, NewString As String)
  4112.             On Local Error GoTo ErrLine
  4113.             Cancel = 1
  4114.             Exit Sub
  4115.             
  4116. ErrLine:
  4117.             Err.Clear
  4118.             Exit Sub
  4119.             End Sub
  4120.             
  4121.             
  4122.             ' ******************************************************************************************************************************
  4123.             ' * procedure name: tvwSimpleTree_BeforeLabelEdit
  4124.             ' * procedure description:  Occurs when a user attempts to edit the label of the currently selected ListItem or Node object.
  4125.             ' *
  4126.             ' ******************************************************************************************************************************
  4127.             Private Sub tvwSimpleTree_BeforeLabelEdit(Cancel As Integer)
  4128.             On Local Error GoTo ErrLine
  4129.             Cancel = 1
  4130.             Exit Sub
  4131.             
  4132. ErrLine:
  4133.             Err.Clear
  4134.             Exit Sub
  4135.             End Sub
  4136.             
  4137.             
  4138.             ' ******************************************************************************************************************************
  4139.             ' * procedure name: tvwSimpleTree_Click
  4140.             ' * procedure description:  Occurs when the user presses and then releases a mouse button over an object.
  4141.             ' *
  4142.             ' ******************************************************************************************************************************
  4143.             Private Sub tvwSimpleTree_Click()
  4144.             On Local Error GoTo ErrLine
  4145.             
  4146.             'set the root node selected if nothing is selected
  4147.             If ObjPtr(tvwSimpleTree.SelectedItem) = 0 Then
  4148.                If tvwSimpleTree.Nodes.Count > 0 Then
  4149.                   If ObjPtr(tvwSimpleTree.Nodes(1).Root) > 0 Then
  4150.                      Set tvwSimpleTree.SelectedItem = tvwSimpleTree.Nodes(1).Root
  4151.                   End If
  4152.                End If
  4153.             End If
  4154.             Exit Sub
  4155.             
  4156. ErrLine:
  4157.             Err.Clear
  4158.             Exit Sub
  4159.             End Sub
  4160.             
  4161.             
  4162.             ' ******************************************************************************************************************************
  4163.             ' * procedure name: tvwSimpleTree_Collapse
  4164.             ' * procedure description:  Generated when any Node object in a TreeView control is collapsed.
  4165.             ' *
  4166.             ' ******************************************************************************************************************************
  4167.             Private Sub tvwSimpleTree_Collapse(ByVal node As MSComctlLib.node)
  4168.             On Local Error GoTo ErrLine
  4169.             
  4170.             'ensure selected
  4171.             If ObjPtr(node) > 0 Then Set tvwSimpleTree.SelectedItem = node
  4172.             Exit Sub
  4173.             
  4174. ErrLine:
  4175.             Err.Clear
  4176.             Exit Sub
  4177.             End Sub
  4178.             
  4179.             
  4180.             ' ******************************************************************************************************************************
  4181.             ' * procedure name: tvwSimpleTree_DblClick
  4182.             ' * procedure description:  Occurs when you press and release a mouse button and then press and release it again over an object.
  4183.             ' *
  4184.             ' ******************************************************************************************************************************
  4185.             Private Sub tvwSimpleTree_DblClick()
  4186.             On Local Error GoTo ErrLine
  4187.             
  4188.             'set focus
  4189.             tvwSimpleTree.SetFocus
  4190.             Exit Sub
  4191.             
  4192. ErrLine:
  4193.             Err.Clear
  4194.             Exit Sub
  4195.             End Sub
  4196.             
  4197.             
  4198.             ' ******************************************************************************************************************************
  4199.             ' * procedure name: tvwSimpleTree_Expand
  4200.             ' * procedure description:  Occurs when a Node object in a TreeView control is expanded; that is, when its child nodes become visible.
  4201.             ' *
  4202.             ' ******************************************************************************************************************************
  4203.             Private Sub tvwSimpleTree_Expand(ByVal node As MSComctlLib.node)
  4204.             On Local Error GoTo ErrLine
  4205.             
  4206.             'ensure selected
  4207.             If ObjPtr(node) > 0 Then Set tvwSimpleTree.SelectedItem = node
  4208.             Exit Sub
  4209.             
  4210. ErrLine:
  4211.             Err.Clear
  4212.             Exit Sub
  4213.             End Sub
  4214.             
  4215.             
  4216.             ' ******************************************************************************************************************************
  4217.             ' * procedure name: tvwSimpleTree_GotFocus
  4218.             ' * procedure description:  Occurs when an object receives the focus.
  4219.             ' *
  4220.             ' ******************************************************************************************************************************
  4221.             Private Sub tvwSimpleTree_GotFocus()
  4222.             On Local Error GoTo ErrLine
  4223.             'reset the tooltip text
  4224.             tvwSimpleTree.ToolTipText = vbNullString
  4225.             Exit Sub
  4226.             
  4227. ErrLine:
  4228.             Err.Clear
  4229.             Exit Sub
  4230.             End Sub
  4231.             
  4232.             
  4233.             ' ******************************************************************************************************************************
  4234.             ' * procedure name: tvwSimpleTree_KeyDown
  4235.             ' * procedure description:  Occurs when the user presses a key while an object has the focus.
  4236.             ' *
  4237.             ' ******************************************************************************************************************************
  4238.             Private Sub tvwSimpleTree_KeyDown(KeyCode As Integer, Shift As Integer)
  4239.             Dim objNode As node
  4240.             On Local Error GoTo ErrLine
  4241.             
  4242.             'obtain the selected node on the treeview
  4243.             If ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  4244.                Set objNode = tvwSimpleTree.SelectedItem
  4245.             Else: Exit Sub
  4246.             End If
  4247.             
  4248.             'cross reference the object's guid with the module-level collection
  4249.             'and attempt to obtain a match based on the unique identifier of the node
  4250.             If ObjPtr(gbl_colNormalEnum(objNode.Key)) > 0 Then
  4251.                Select Case objNode.Tag
  4252.                   Case "AMTimelineGroup"
  4253.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4254.                   Case "AMTimelineComp"
  4255.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4256.                   Case "AMTimelineTrack"
  4257.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4258.                   Case "AMTimelineSrc"
  4259.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4260.                   Case "AMTimelineTrans"
  4261.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4262.                   Case "AMTimelineEffect"
  4263.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4264.               End Select
  4265.             Else: Exit Sub
  4266.             End If
  4267.             
  4268.             
  4269.             If KeyCode = vbKeyDelete Then
  4270.                'delete the item from the treeview
  4271.                If ObjPtr(gbl_colNormalEnum(objNode.Key)) > 0 Then
  4272.                
  4273.                   Select Case objNode.Tag
  4274.                   
  4275.                      Case "AMTimeline"
  4276.                         'dereference & clean-up the existing timeline
  4277.                         If ObjPtr(gbl_objTimeline) > 0 Then Call ClearTimeline(gbl_objTimeline)
  4278.                         'dereference & clean-up application-level data
  4279.                         If ObjPtr(gbl_objTimeline) > 0 Then Set gbl_objTimeline = Nothing
  4280.                         If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  4281.                         'reinitalize application-level data
  4282.                         Set gbl_objTimeline = New AMTimeline
  4283.                         Set gbl_objFilterGraph = New FilgraphManager
  4284.                         'reinitalize the treeview/listview
  4285.                         Call lstViewInfo.ListItems.Clear
  4286.                         Call tvwSimpleTree.Nodes.Clear
  4287.                         
  4288.                      Case "AMTimelineGroup"
  4289.                          'dupe the functionality of a manual group delete
  4290.                          Call mnuGroupDelete_Click
  4291.                          
  4292.                      Case "AMTimelineComp"
  4293.                          'dupe the functionality of a manual composition delete
  4294.                          Call mnuCompDelete_Click
  4295.                          
  4296.                      Case "AMTimelineTrack"
  4297.                          'dupe the functionality of a manual track delete
  4298.                          Call mnuTrackDelete_Click
  4299.                          
  4300.                      Case "AMTimelineSrc"
  4301.                          'dupe the functionality of a manual clip source delete
  4302.                          Call mnuClipDelete_Click
  4303.                          
  4304.                      Case "AMTimelineTrans"
  4305.                          'dupe the functionality of a manual transition delete
  4306.                          Call mnuTransDelete_Click
  4307.                          
  4308.                      Case "AMTimelineEffect"
  4309.                          'dupe the functionality of a manual effect delete
  4310.                          Call mnuEffectDelete_Click
  4311.                  End Select
  4312.                Else: Exit Sub
  4313.                End If
  4314.             End If
  4315.             Exit Sub
  4316.             
  4317. ErrLine:
  4318.             Err.Clear
  4319.             Exit Sub
  4320.             End Sub
  4321.             
  4322.             
  4323.             ' ******************************************************************************************************************************
  4324.             ' * procedure name: tvwSimpleTree_LostFocus
  4325.             ' * procedure description:  Occurs when an object loses the focus.
  4326.             ' *
  4327.             ' ******************************************************************************************************************************
  4328.             Private Sub tvwSimpleTree_LostFocus()
  4329.             On Local Error GoTo ErrLine
  4330.             'reset the tooltip text
  4331.             tvwSimpleTree.ToolTipText = vbNullString
  4332.             Exit Sub
  4333.             
  4334. ErrLine:
  4335.             Err.Clear
  4336.             Exit Sub
  4337.             End Sub
  4338.             
  4339.             
  4340.             ' ******************************************************************************************************************************
  4341.             ' * procedure name: tvwSimpleTree_MouseDown
  4342.             ' * procedure description:   Occurs when the user presses the mouse button while an object has the focus.
  4343.             ' *
  4344.             ' ******************************************************************************************************************************
  4345.             Private Sub tvwSimpleTree_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4346.             Dim objNode As node
  4347.             On Local Error GoTo ErrLine
  4348.             
  4349.             'get the current node
  4350.             If ObjPtr(tvwSimpleTree.HitTest(X, Y)) > 0 Then
  4351.                Set objNode = tvwSimpleTree.HitTest(X, Y)
  4352.                Set tvwSimpleTree.SelectedItem = objNode
  4353.             ElseIf ObjPtr(tvwSimpleTree.SelectedItem) > 0 Then
  4354.                Set objNode = tvwSimpleTree.SelectedItem
  4355.             Else: Exit Sub
  4356.             End If
  4357.             
  4358.             'cross reference the object's guid with the module-level collection
  4359.             'and attempt to obtain a match based on the unique identifier of the node
  4360.             If ObjPtr(gbl_colNormalEnum(objNode.Key)) > 0 Then
  4361.                Select Case objNode.Tag
  4362.                   Case "AMTimelineGroup"
  4363.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4364.                   Case "AMTimelineComp"
  4365.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4366.                   Case "AMTimelineTrack"
  4367.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4368.                   Case "AMTimelineSrc"
  4369.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4370.                   Case "AMTimelineTrans"
  4371.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4372.                   Case "AMTimelineEffect"
  4373.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4374.               End Select
  4375.             Else: Exit Sub
  4376.             End If
  4377.             
  4378.             'display a tooltip for the item
  4379.             If ObjPtr(objNode) > 0 Then
  4380.                If Trim(objNode.Text) <> vbNullString Then
  4381.                   tvwSimpleTree.ToolTipText = objNode.Text
  4382.                End If
  4383.             End If
  4384.             
  4385.             'update the listview with the item's information
  4386.             If ObjPtr(gbl_colNormalEnum(objNode.Key)) > 0 Then
  4387.                Select Case objNode.Tag
  4388.                   Case "AMTimeline"
  4389.                      Call RefreshListView(lstViewInfo, "AMTimeline", objNode.Key)
  4390.                      Call ViewTimelineInfo(lstViewInfo, gbl_objTimeline)
  4391.                      
  4392.                   Case "AMTimelineGroup"
  4393.                       Call RefreshListView(lstViewInfo, "AMTimelineGroup", objNode.Key)
  4394.                       Call ViewGroupInfo(lstViewInfo, gbl_objDexterObject)
  4395.                       
  4396.                   Case "AMTimelineComp"
  4397.                       Call RefreshListView(lstViewInfo, "AMTimelineComp", objNode.Key)
  4398.                       Call ViewCompositeInfo(lstViewInfo, gbl_objDexterObject)
  4399.                       
  4400.                   Case "AMTimelineTrack"
  4401.                       Call RefreshListView(lstViewInfo, "AMTimelineTrack", objNode.Key)
  4402.                       Call ViewTrackInfo(lstViewInfo, gbl_objDexterObject)
  4403.                       
  4404.                   Case "AMTimelineSrc"
  4405.                       Call RefreshListView(lstViewInfo, "AMTimelineSrc", objNode.Key)
  4406.                       Call ViewSourceInfo(lstViewInfo, gbl_objDexterObject)
  4407.                       
  4408.                   Case "AMTimelineTrans"
  4409.                       Call RefreshListView(lstViewInfo, "AMTimelineTrans", objNode.Key)
  4410.                       Call ViewTransitionInfo(lstViewInfo, gbl_objDexterObject)
  4411.                       
  4412.                   Case "AMTimelineEffect"
  4413.                       Call RefreshListView(lstViewInfo, "AMTimelineEffect", objNode.Key)
  4414.                       Call ViewEffectInfo(lstViewInfo, gbl_objDexterObject)
  4415.                       
  4416.               End Select
  4417.             Else: Exit Sub
  4418.             End If
  4419.             
  4420.             'derive the type of object given the tag of the node
  4421.             'and popup the menu for the given object type..
  4422.             If Button = 2 Then
  4423.                Select Case objNode.Tag
  4424.                    Case "AMTimeline"
  4425.                        PopupMenu mnuTimeline
  4426.                    Case "AMTimelineGroup"
  4427.                        PopupMenu mnuGroup
  4428.                    Case "AMTimelineComp"
  4429.                        PopupMenu mnuComp
  4430.                    Case "AMTimelineTrack"
  4431.                        PopupMenu mnuTrack
  4432.                    Case "AMTimelineSrc"
  4433.                        PopupMenu mnuClip
  4434.                    Case "AMTimelineTrans"
  4435.                        PopupMenu mnuTrans
  4436.                    Case "AMTimelineEffect"
  4437.                        PopupMenu mnuEffect
  4438.                End Select
  4439.             End If
  4440.             
  4441.             'clean-up & dereference
  4442.             If ObjPtr(objNode) > 0 Then Set objNode = Nothing
  4443.             Exit Sub
  4444.             
  4445. ErrLine:
  4446.             Err.Clear
  4447.             Exit Sub
  4448.             End Sub
  4449.             
  4450.             
  4451.             ' ******************************************************************************************************************************
  4452.             ' * procedure name: tvwSimpleTree_MouseMove
  4453.             ' * procedure description:  Occurs when the user moves the mouse.
  4454.             ' *
  4455.             ' ******************************************************************************************************************************
  4456.             Private Sub tvwSimpleTree_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4457.             On Local Error GoTo ErrLine
  4458.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  4459.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  4460.             
  4461.             'disable tooltip if a hittest on the current position fails
  4462.             If ObjPtr(tvwSimpleTree.HitTest(X, Y)) = 0 Then tvwSimpleTree.ToolTipText = vbNullString
  4463.             Exit Sub
  4464.             
  4465. ErrLine:
  4466.             Err.Clear
  4467.             Exit Sub
  4468.             End Sub
  4469.             
  4470.             
  4471.             ' ******************************************************************************************************************************
  4472.             ' * procedure name: tvwSimpleTree_NodeClick
  4473.             ' * procedure description:  Occurs when a Node object is clicked.
  4474.             ' *
  4475.             ' ******************************************************************************************************************************
  4476.             Private Sub tvwSimpleTree_NodeClick(ByVal node As MSComctlLib.node)
  4477.             On Local Error GoTo ErrLine
  4478.             
  4479.             'display a tooltip for the item
  4480.             If ObjPtr(node) > 0 Then
  4481.                If Trim(node.Text) <> vbNullString Then
  4482.                   tvwSimpleTree.ToolTipText = node.Text
  4483.                End If
  4484.             End If
  4485.             
  4486.             'update the listview with the item's information
  4487.             If ObjPtr(gbl_colNormalEnum(node.Key)) > 0 Then
  4488.                Select Case node.Tag
  4489.                   Case "AMTimeline"
  4490.                      Call RefreshListView(lstViewInfo, "AMTimeline", node.Key)
  4491.                      Call ViewTimelineInfo(lstViewInfo, gbl_objTimeline)
  4492.                      
  4493.                   Case "AMTimelineGroup"
  4494.                       Call RefreshListView(lstViewInfo, "AMTimelineGroup", node.Key)
  4495.                       Call ViewGroupInfo(lstViewInfo, gbl_objDexterObject)
  4496.                       
  4497.                   Case "AMTimelineComp"
  4498.                       Call RefreshListView(lstViewInfo, "AMTimelineComp", node.Key)
  4499.                       Call ViewCompositeInfo(lstViewInfo, gbl_objDexterObject)
  4500.                       
  4501.                   Case "AMTimelineTrack"
  4502.                       Call RefreshListView(lstViewInfo, "AMTimelineTrack", node.Key)
  4503.                       Call ViewTrackInfo(lstViewInfo, gbl_objDexterObject)
  4504.                       
  4505.                   Case "AMTimelineSrc"
  4506.                       Call RefreshListView(lstViewInfo, "AMTimelineSrc", node.Key)
  4507.                       Call ViewSourceInfo(lstViewInfo, gbl_objDexterObject)
  4508.                       
  4509.                   Case "AMTimelineTrans"
  4510.                       Call RefreshListView(lstViewInfo, "AMTimelineTrans", node.Key)
  4511.                       Call ViewTransitionInfo(lstViewInfo, gbl_objDexterObject)
  4512.                       
  4513.                   Case "AMTimelineEffect"
  4514.                       Call RefreshListView(lstViewInfo, "AMTimelineEffect", node.Key)
  4515.                       Call ViewEffectInfo(lstViewInfo, gbl_objDexterObject)
  4516.                       
  4517.               End Select
  4518.             Else: Exit Sub
  4519.             End If
  4520.             Exit Sub
  4521.             
  4522. ErrLine:
  4523.             Err.Clear
  4524.             Exit Sub
  4525.             End Sub
  4526.             
  4527.             
  4528.             ' ******************************************************************************************************************************
  4529.             ' * procedure name: tvwSimpleTree_OLEDragDrop
  4530.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  4531.             ' *
  4532.             ' ******************************************************************************************************************************
  4533.             Private Sub tvwSimpleTree_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4534.             Dim nCount As Long
  4535.             Dim bstrFileName As String
  4536.             Dim objLocalTimeline As AMTimeline
  4537.             On Local Error GoTo ErrLine
  4538.             
  4539.             For nCount = 1 To Data.Files.Count
  4540.                   bstrFileName = Data.Files(nCount)
  4541.                   If Len(bstrFileName) > 4 Then
  4542.                         'verify the file extension is valid
  4543.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4544.                            'at least it's been named an xtl file, proceed to attempt an import..
  4545.                            Set objLocalTimeline = New AMTimeline
  4546.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  4547.                            'verify restoration
  4548.                            If ObjPtr(objLocalTimeline) > 0 Then
  4549.                               'import succeeded; clean-up global scope
  4550.                               If ObjPtr(gbl_objTimeline) > 0 Then
  4551.                                  Call ClearTimeline(gbl_objTimeline)
  4552.                                  Set gbl_objTimeline = Nothing
  4553.                               End If
  4554.                               'assign the local timeline to global scope
  4555.                               Set gbl_objTimeline = objLocalTimeline
  4556.                               'render the timeline and derive a filter graph manager
  4557.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  4558.                               'map the timeline to the userinterface
  4559.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  4560.                               mnuTimeLineClearRenderEngine.Enabled = False
  4561.                               'update the button(s)
  4562.                               With tbMain.Buttons
  4563.                                  .Item("Play").Image = 6
  4564.                                  .Item("Pause").Image = 7
  4565.                                  .Item("Stop").Image = 22
  4566.                                  .Item("Rewind").Image = 18
  4567.                                  .Item("FastForward").Image = 24
  4568.                                  .Item("SeekForward").Image = 23
  4569.                                  .Item("SeekBackward").Image = 19
  4570.                                  .Item("Play").Enabled = True
  4571.                                  .Item("Pause").Enabled = True
  4572.                                  .Item("Stop").Enabled = False
  4573.                                  .Item("Rewind").Enabled = False
  4574.                                  .Item("FastForward").Enabled = False
  4575.                                  .Item("SeekForward").Enabled = False
  4576.                                  .Item("SeekBackward").Enabled = False
  4577.                               End With
  4578.                               'update the state on the popup context menu
  4579.                               mnuTimeLinePlay.Enabled = True
  4580.                               mnuTimeLineStop.Enabled = False
  4581.                               mnuTimeLinePause.Enabled = True
  4582.                               mnuTimeLineRenderTimeLine.Enabled = False
  4583.                               mnuTimeLineClearRenderEngine.Enabled = False
  4584.                               'reset module-level filename
  4585.                               gbl_bstrLoadFile = Data.Files(nCount)
  4586.                               'reset the caption on the application's main form
  4587.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  4588.                               Me.Caption = "DexterVB - " & bstrFileName
  4589.                            End If
  4590.                         End If
  4591.                         'clean-up & dereference
  4592.                         If ObjPtr(objLocalTimeline) > 0 Then
  4593.                            Set objLocalTimeline = Nothing
  4594.                            Exit For
  4595.                         End If
  4596.                   End If
  4597.             Next
  4598.             Exit Sub
  4599.             
  4600. ErrLine:
  4601.             Err.Clear
  4602.             Exit Sub
  4603.             End Sub
  4604.             
  4605.             
  4606.             ' ******************************************************************************************************************************
  4607.             ' * procedure name: tvwSimpleTree_OLEDragOver
  4608.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4609.             ' *
  4610.             ' ******************************************************************************************************************************
  4611.             Private Sub tvwSimpleTree_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4612.             Dim nCount As Long
  4613.             Dim bstrFileName As String
  4614.             On Local Error GoTo ErrLine
  4615.             
  4616.             'do not allow drag n' drop operations when rendering..
  4617.             If ObjPtr(gbl_objQuartzVB) > 0 Then
  4618.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  4619.                   Effect = vbDropEffectNone
  4620.                   Exit Sub
  4621.                End If
  4622.             End If
  4623.             
  4624.             For nCount = 1 To Data.Files.Count
  4625.                   bstrFileName = Data.Files(nCount)
  4626.                   If Len(bstrFileName) > 4 Then
  4627.                         'verify the file extension is valid
  4628.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4629.                            'at least it's been named an xtl file, proceed to attempt an import..
  4630.                            Effect = vbDropEffectCopy
  4631.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  4632.                         End If
  4633.                   End If
  4634.             Next
  4635.             Exit Sub
  4636.             
  4637. ErrLine:
  4638.             Err.Clear
  4639.             Exit Sub
  4640.             End Sub
  4641. ' **************************************************************************************************************************************
  4642. ' * PRIVATE INTERFACE- TOOLBAR EVENT HANDLERS
  4643.             ' ******************************************************************************************************************************
  4644.             ' * procedure name: tbMain_ButtonClick
  4645.             ' * procedure description:  Occurs when the user clicks on a Button object in a Toolbar control.
  4646.             ' *
  4647.             ' ******************************************************************************************************************************
  4648.             Private Sub tbMain_ButtonClick(ByVal Button As MSComctlLib.Button)
  4649.             On Local Error GoTo ErrLine
  4650.             
  4651.                  Select Case LCase(Button.Key)
  4652.                      Case "new"
  4653.                               'the functionality is identical to the file 'new' menu option
  4654.                               Call mnuFileNew_Click
  4655.                      Case "open"
  4656.                               'the functionality is identical to the file 'open' menu option
  4657.                               Call mnuFileOpen_Click
  4658.                      Case "save"
  4659.                               'the functionality is identical to the file 'saveas' menu option
  4660.                               Call mnuFileSaveAs_Click
  4661.                      Case "rewind"
  4662.                               'seek to the beggining of the media
  4663.                               Select Case gbl_objQuartzVB.State
  4664.                                    Case QTZStatusConstants.QTZStatusPlaying
  4665.                                             Call gbl_objQuartzVB.StopGraph
  4666.                                             gbl_objQuartzVB.Position = 0
  4667.                                             
  4668.                                    Case QTZStatusConstants.QTZStatusPaused
  4669.                                             gbl_objQuartzVB.Position = 0
  4670.                                             
  4671.                                    Case QTZStatusConstants.QTZStatusStopped
  4672.                                             gbl_objQuartzVB.Position = 0
  4673.                                End Select
  4674.                               
  4675.                               
  4676.                      Case "seekbackward"
  4677.                               'scrub backward by one second
  4678.                               Select Case gbl_objQuartzVB.State
  4679.                                    Case QTZStatusConstants.QTZStatusPlaying
  4680.                                             Call gbl_objQuartzVB.StopGraph
  4681.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position - 1
  4682.                                             
  4683.                                    Case QTZStatusConstants.QTZStatusPaused
  4684.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position - 1
  4685.                                             
  4686.                                    Case QTZStatusConstants.QTZStatusStopped
  4687.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position - 1
  4688.                                End Select
  4689.                               
  4690.                               
  4691.                      Case "play"
  4692.                                'play the timeline for the client
  4693.                                Select Case gbl_objQuartzVB.State
  4694.                                    Case QTZStatusConstants.QTZStatusPlaying
  4695.                                             Call gbl_objQuartzVB.StopGraph
  4696.                                             gbl_objQuartzVB.Position = 0
  4697.                                             Call gbl_objQuartzVB.RunGraph
  4698.                                             
  4699.                                    Case QTZStatusConstants.QTZStatusPaused
  4700.                                             Call gbl_objQuartzVB.RunGraph
  4701.                                             
  4702.                                    Case QTZStatusConstants.QTZStatusStopped
  4703.                                             'to prevent rendering out the timeline again (consequently resetting the media's
  4704.                                             'position to zero before restarting audio/video playback) comment the line below..
  4705.                                             Set gbl_objQuartzVB.FilterGraph = RenderTimeline(gbl_objTimeline)
  4706.                                             Call gbl_objQuartzVB.RunGraph
  4707.                                End Select
  4708.                                
  4709.                                'update the button(s)
  4710.                                With tbMain.Buttons
  4711.                                   .Item("Play").Image = 20
  4712.                                   .Item("Pause").Image = 7
  4713.                                   .Item("Stop").Image = 8
  4714.                                   .Item("Rewind").Image = 18
  4715.                                   .Item("FastForward").Image = 24
  4716.                                   .Item("SeekForward").Image = 23
  4717.                                   .Item("SeekBackward").Image = 19
  4718.                                   .Item("Play").Enabled = False
  4719.                                   .Item("Pause").Enabled = True
  4720.                                   .Item("Stop").Enabled = True
  4721.                                   .Item("Rewind").Enabled = False
  4722.                                   .Item("FastForward").Enabled = False
  4723.                                   .Item("SeekForward").Enabled = False
  4724.                                   .Item("SeekBackward").Enabled = False
  4725.                                End With
  4726.                                'update the state on the popup context menu
  4727.                                mnuTimeLinePlay.Enabled = False
  4728.                                mnuTimeLineStop.Enabled = True
  4729.                                mnuTimeLinePause.Enabled = True
  4730.                                mnuTimeLineRenderTimeLine.Enabled = False
  4731.                                mnuTimeLineClearRenderEngine.Enabled = False
  4732.                                
  4733.                                'wait until the media has completed
  4734.                                Do Until gbl_objQuartzVB.Position = gbl_objQuartzVB.StopTime: DoEvents
  4735.                                   'be sure to stop the media if the app is closing
  4736.                                   If frmMain.Visible = False Then
  4737.                                      Call gbl_objQuartzVB.StopGraph
  4738.                                      Exit Do
  4739.                                   End If
  4740.                                Loop
  4741.                                If frmMain.Visible = False Then
  4742.                                   Call mnuFileExit_Click
  4743.                                   Exit Sub
  4744.                                Else
  4745.                                   Call gbl_objQuartzVB.StopGraph
  4746.                                End If
  4747.                                
  4748.                                'reset the button(s)
  4749.                                With tbMain.Buttons
  4750.                                   .Item("Play").Image = 6
  4751.                                   .Item("Pause").Image = 7
  4752.                                   .Item("Stop").Image = 22
  4753.                                   .Item("Rewind").Image = 18
  4754.                                   .Item("FastForward").Image = 24
  4755.                                   .Item("SeekForward").Image = 23
  4756.                                   .Item("SeekBackward").Image = 19
  4757.                                   .Item("Play").Enabled = True
  4758.                                   .Item("Pause").Enabled = True
  4759.                                   .Item("Stop").Enabled = False
  4760.                                   .Item("Rewind").Enabled = False
  4761.                                   .Item("FastForward").Enabled = False
  4762.                                   .Item("SeekForward").Enabled = False
  4763.                                   .Item("SeekBackward").Enabled = False
  4764.                                End With
  4765.                                'update the state on the popup context menu
  4766.                                mnuTimeLinePlay.Enabled = True
  4767.                                mnuTimeLineStop.Enabled = False
  4768.                                mnuTimeLinePause.Enabled = False
  4769.                                mnuTimeLineRenderTimeLine.Enabled = True
  4770.                                mnuTimeLineClearRenderEngine.Enabled = True
  4771.                                
  4772.                                
  4773.                      Case "pause"
  4774.                                'pause the timeline
  4775.                               Select Case gbl_objQuartzVB.State
  4776.                                    Case QTZStatusConstants.QTZStatusPlaying
  4777.                                             Call gbl_objQuartzVB.PauseGraph
  4778.                                             
  4779.                                    Case QTZStatusConstants.QTZStatusPaused
  4780.                                             Call gbl_objQuartzVB.PauseGraph
  4781.                                             
  4782.                                    Case QTZStatusConstants.QTZStatusStopped
  4783.                                             Call gbl_objQuartzVB.PauseGraph
  4784.                                End Select
  4785.                               
  4786.                               'update the button(s)
  4787.                                With tbMain.Buttons
  4788.                                   .Item("Play").Image = 6
  4789.                                   .Item("Pause").Image = 21
  4790.                                   .Item("Stop").Image = 8
  4791.                                   .Item("Rewind").Image = 4
  4792.                                   .Item("FastForward").Image = 10
  4793.                                   .Item("SeekForward").Image = 9
  4794.                                   .Item("SeekBackward").Image = 5
  4795.                                   .Item("Play").Enabled = True
  4796.                                   .Item("Pause").Enabled = False
  4797.                                   .Item("Stop").Enabled = True
  4798.                                   .Item("Rewind").Enabled = True
  4799.                                   .Item("FastForward").Enabled = True
  4800.                                   .Item("SeekForward").Enabled = True
  4801.                                   .Item("SeekBackward").Enabled = True
  4802.                                End With
  4803.                                'update the state on the popup context menu
  4804.                                mnuTimeLinePlay.Enabled = True
  4805.                                mnuTimeLineStop.Enabled = True
  4806.                                mnuTimeLinePause.Enabled = False
  4807.                                mnuTimeLineRenderTimeLine.Enabled = False
  4808.                                mnuTimeLineClearRenderEngine.Enabled = False
  4809.                                
  4810.                                
  4811.                      Case "stop"
  4812.                               'stop the timeline
  4813.                               Select Case gbl_objQuartzVB.State
  4814.                                    Case QTZStatusConstants.QTZStatusPlaying
  4815.                                             Call gbl_objQuartzVB.StopGraph
  4816.                                             
  4817.                                    Case QTZStatusConstants.QTZStatusPaused
  4818.                                             Call gbl_objQuartzVB.StopGraph
  4819.                                             
  4820.                                    Case QTZStatusConstants.QTZStatusStopped
  4821.                                             Call gbl_objQuartzVB.StopGraph
  4822.                                End Select
  4823.                                
  4824.                               'update the button(s)
  4825.                                With tbMain.Buttons
  4826.                                   .Item("Play").Image = 6
  4827.                                   .Item("Pause").Image = 7
  4828.                                   .Item("Stop").Image = 22
  4829.                                   .Item("Rewind").Image = 18
  4830.                                   .Item("FastForward").Image = 24
  4831.                                   .Item("SeekForward").Image = 23
  4832.                                   .Item("SeekBackward").Image = 19
  4833.                                   .Item("Play").Enabled = True
  4834.                                   .Item("Pause").Enabled = True
  4835.                                   .Item("Stop").Enabled = False
  4836.                                   .Item("Rewind").Enabled = False
  4837.                                   .Item("FastForward").Enabled = False
  4838.                                   .Item("SeekForward").Enabled = False
  4839.                                   .Item("SeekBackward").Enabled = False
  4840.                                End With
  4841.                                'update the state on the popup context menu
  4842.                                mnuTimeLinePlay.Enabled = True
  4843.                                mnuTimeLineStop.Enabled = False
  4844.                                mnuTimeLinePause.Enabled = False
  4845.                                mnuTimeLineRenderTimeLine.Enabled = True
  4846.                                mnuTimeLineClearRenderEngine.Enabled = True
  4847.                               
  4848.                      Case "seekforward"
  4849.                               'scrub forward by one second
  4850.                               Select Case gbl_objQuartzVB.State
  4851.                                    Case QTZStatusConstants.QTZStatusPlaying
  4852.                                             Call gbl_objQuartzVB.PauseGraph
  4853.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position + 1
  4854.                                             
  4855.                                    Case QTZStatusConstants.QTZStatusPaused
  4856.                                             Call gbl_objQuartzVB.PauseGraph
  4857.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position + 1
  4858.                                             
  4859.                                    Case QTZStatusConstants.QTZStatusStopped
  4860.                                             Call gbl_objQuartzVB.PauseGraph
  4861.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position + 1
  4862.                                End Select
  4863.                               
  4864.                               
  4865.                      Case "fastforward"
  4866.                               'seek to the end of the media
  4867.                               Select Case gbl_objQuartzVB.State
  4868.                                    Case QTZStatusConstants.QTZStatusPlaying
  4869.                                             Call gbl_objQuartzVB.PauseGraph
  4870.                                             gbl_objQuartzVB.Position = (gbl_objQuartzVB.StopTime - 0.01)
  4871.                                             
  4872.                                    Case QTZStatusConstants.QTZStatusPaused
  4873.                                             Call gbl_objQuartzVB.PauseGraph
  4874.                                             gbl_objQuartzVB.Position = (gbl_objQuartzVB.StopTime - 0.01)
  4875.                                             
  4876.                                    Case QTZStatusConstants.QTZStatusStopped
  4877.                                             Call gbl_objQuartzVB.PauseGraph
  4878.                                             gbl_objQuartzVB.Position = (gbl_objQuartzVB.StopTime - 0.01)
  4879.                                End Select
  4880.                  End Select
  4881.             Exit Sub
  4882.             
  4883. ErrLine:
  4884.             Err.Clear
  4885.             Exit Sub
  4886.             End Sub
  4887.             
  4888.             
  4889.             ' ******************************************************************************************************************************
  4890.             ' * procedure name: tbMain_MouseMove
  4891.             ' * procedure description:  Occurs when the user moves the mouse.
  4892.             ' *
  4893.             ' ******************************************************************************************************************************
  4894.             Private Sub tbMain_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4895.             On Local Error GoTo ErrLine
  4896.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  4897.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  4898.             Exit Sub
  4899.             
  4900. ErrLine:
  4901.             Err.Clear
  4902.             Exit Sub
  4903.             End Sub
  4904.             
  4905.             
  4906.             ' ******************************************************************************************************************************
  4907.             ' * procedure name: tbMain_OLEDragDrop
  4908.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  4909.             ' *
  4910.             ' ******************************************************************************************************************************
  4911.             Private Sub tbMain_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4912.             Dim nCount As Long
  4913.             Dim bstrFileName As String
  4914.             Dim objLocalTimeline As AMTimeline
  4915.             On Local Error GoTo ErrLine
  4916.             
  4917.             For nCount = 1 To Data.Files.Count
  4918.                   bstrFileName = Data.Files(nCount)
  4919.                   If Len(bstrFileName) > 4 Then
  4920.                         'verify the file extension is valid
  4921.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4922.                            'at least it's been named an xtl file, proceed to attempt an import..
  4923.                            Set objLocalTimeline = New AMTimeline
  4924.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  4925.                            'verify restoration
  4926.                            If ObjPtr(objLocalTimeline) > 0 Then
  4927.                               'import succeeded; clean-up application scope
  4928.                               If ObjPtr(gbl_objTimeline) > 0 Then
  4929.                                  'dereference & clean-up timeline
  4930.                                  Call ClearTimeline(gbl_objTimeline)
  4931.                                  Set gbl_objTimeline = Nothing
  4932.                                  'dereference & clean-up rendering
  4933.                                 If ObjPtr(gbl_objQuartzVB) > 0 Then Call gbl_objQuartzVB.StopGraph
  4934.                                 If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  4935.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Call gbl_objRenderEngine.ScrapIt
  4936.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  4937.                               End If
  4938.                               'assign the local timeline to global scope
  4939.                               Set gbl_objTimeline = objLocalTimeline
  4940.                               'render the timeline and derive a filter graph manager
  4941.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  4942.                               'map the timeline to the userinterface
  4943.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  4944.                               mnuTimeLineClearRenderEngine.Enabled = False
  4945.                               'update the button(s)
  4946.                               With tbMain.Buttons
  4947.                                  .Item("Play").Image = 6
  4948.                                  .Item("Pause").Image = 7
  4949.                                  .Item("Stop").Image = 22
  4950.                                  .Item("Rewind").Image = 18
  4951.                                  .Item("FastForward").Image = 24
  4952.                                  .Item("SeekForward").Image = 23
  4953.                                  .Item("SeekBackward").Image = 19
  4954.                                  .Item("Play").Enabled = True
  4955.                                  .Item("Pause").Enabled = True
  4956.                                  .Item("Stop").Enabled = False
  4957.                                  .Item("Rewind").Enabled = False
  4958.                                  .Item("FastForward").Enabled = False
  4959.                                  .Item("SeekForward").Enabled = False
  4960.                                  .Item("SeekBackward").Enabled = False
  4961.                               End With
  4962.                               'update the state on the popup context menu
  4963.                               mnuTimeLinePlay.Enabled = True
  4964.                               mnuTimeLineStop.Enabled = False
  4965.                               mnuTimeLinePause.Enabled = True
  4966.                               mnuTimeLineRenderTimeLine.Enabled = False
  4967.                               mnuTimeLineClearRenderEngine.Enabled = False
  4968.                               'reset module-level filename
  4969.                               gbl_bstrLoadFile = Data.Files(nCount)
  4970.                               'reset the caption on the application's main form
  4971.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  4972.                               Me.Caption = "DexterVB - " & bstrFileName
  4973.                            End If
  4974.                         End If
  4975.                         'clean-up & dereference
  4976.                         If ObjPtr(objLocalTimeline) > 0 Then
  4977.                            Set objLocalTimeline = Nothing
  4978.                            Exit For
  4979.                         End If
  4980.                   End If
  4981.             Next
  4982.             Exit Sub
  4983.             
  4984. ErrLine:
  4985.             Err.Clear
  4986.             Exit Sub
  4987.             End Sub
  4988.             
  4989.             
  4990.             ' ******************************************************************************************************************************
  4991.             ' * procedure name: tbMain_OLEDragOver
  4992.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4993.             ' *
  4994.             ' ******************************************************************************************************************************
  4995.             Private Sub tbMain_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4996.             Dim nCount As Long
  4997.             Dim bstrFileName As String
  4998.             On Local Error GoTo ErrLine
  4999.             
  5000.             'do not allow drag n' drop operations when rendering..
  5001.             If ObjPtr(gbl_objQuartzVB) > 0 Then
  5002.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  5003.                   Effect = vbDropEffectNone
  5004.                   Exit Sub
  5005.                End If
  5006.             End If
  5007.             
  5008.             For nCount = 1 To Data.Files.Count
  5009.                   bstrFileName = Data.Files(nCount)
  5010.                   If Len(bstrFileName) > 4 Then
  5011.                         'verify the file extension is valid
  5012.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  5013.                            'at least it's been named an xtl file, proceed to attempt an import..
  5014.                            Effect = vbDropEffectCopy
  5015.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  5016.                         End If
  5017.                   End If
  5018.             Next
  5019.             Exit Sub
  5020.             
  5021. ErrLine:
  5022.             Err.Clear
  5023.             Exit Sub
  5024.             End Sub
  5025.             
  5026. ' **************************************************************************************************************************************
  5027. ' * PRIVATE INTERFACE- COOLBAR EVENT HANDLERS
  5028.             ' ******************************************************************************************************************************
  5029.             ' * procedure name: ctrlCoolBar_HeightChanged
  5030.             ' * procedure description:  Occurrs when the Coolbar control's Height changes, if its Orientation is horizontal.  Occurrs when the Coolbar control's Width changes, if its Orientation is vertical.
  5031.             ' *
  5032.             ' ******************************************************************************************************************************
  5033.             Private Sub ctrlCoolBar_HeightChanged(ByVal NewHeight As Single)
  5034.             On Local Error GoTo ErrLine
  5035.             'resize the container
  5036.             Call Form_Resize
  5037.             Exit Sub
  5038.             
  5039. ErrLine:
  5040.             Err.Clear
  5041.             Exit Sub
  5042.             End Sub
  5043.             
  5044.             
  5045.             ' ******************************************************************************************************************************
  5046.             ' * procedure name: ctrlCoolBar_MouseMove
  5047.             ' * procedure description:  Occurs when the user moves the mouse.
  5048.             ' *
  5049.             ' ******************************************************************************************************************************
  5050.             Private Sub ctrlCoolBar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  5051.             On Local Error GoTo ErrLine
  5052.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  5053.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  5054.             Exit Sub
  5055.             
  5056. ErrLine:
  5057.             Err.Clear
  5058.             Exit Sub
  5059.             End Sub
  5060.                      
  5061.             
  5062.             ' ******************************************************************************************************************************
  5063.             ' * procedure name: ctrlCoolBar_OLEDragDrop
  5064.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  5065.             ' *
  5066.             ' ******************************************************************************************************************************
  5067.             Private Sub ctrlCoolBar_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  5068.             Dim nCount As Long
  5069.             Dim bstrFileName As String
  5070.             Dim objLocalTimeline As AMTimeline
  5071.             On Local Error GoTo ErrLine
  5072.             
  5073.             For nCount = 1 To Data.Files.Count
  5074.                   bstrFileName = Data.Files(nCount)
  5075.                   If Len(bstrFileName) > 4 Then
  5076.                         'verify the file extension is valid
  5077.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  5078.                            'at least it's been named an xtl file, proceed to attempt an import..
  5079.                            Set objLocalTimeline = New AMTimeline
  5080.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  5081.                            'verify restoration
  5082.                            If ObjPtr(objLocalTimeline) > 0 Then
  5083.                               'import succeeded; clean-up application scope
  5084.                               If ObjPtr(gbl_objTimeline) > 0 Then
  5085.                                  'dereference & clean-up timeline
  5086.                                  Call ClearTimeline(gbl_objTimeline)
  5087.                                  Set gbl_objTimeline = Nothing
  5088.                                  'dereference & clean-up rendering
  5089.                                 If ObjPtr(gbl_objQuartzVB) > 0 Then Call gbl_objQuartzVB.StopGraph
  5090.                                 If ObjPtr(gbl_objFilterGraph) > 0 Then Set gbl_objFilterGraph = Nothing
  5091.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Call gbl_objRenderEngine.ScrapIt
  5092.                                 If ObjPtr(gbl_objRenderEngine) > 0 Then Set gbl_objRenderEngine = Nothing
  5093.                               End If
  5094.                               'assign the local timeline to global scope
  5095.                               Set gbl_objTimeline = objLocalTimeline
  5096.                               'render the timeline and derive a filter graph manager
  5097.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  5098.                               'map the timeline to the userinterface
  5099.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  5100.                               mnuTimeLineClearRenderEngine.Enabled = False
  5101.                               'update the button(s)
  5102.                               With tbMain.Buttons
  5103.                                  .Item("Play").Image = 6
  5104.                                  .Item("Pause").Image = 7
  5105.                                  .Item("Stop").Image = 22
  5106.                                  .Item("Rewind").Image = 18
  5107.                                  .Item("FastForward").Image = 24
  5108.                                  .Item("SeekForward").Image = 23
  5109.                                  .Item("SeekBackward").Image = 19
  5110.                                  .Item("Play").Enabled = True
  5111.                                  .Item("Pause").Enabled = True
  5112.                                  .Item("Stop").Enabled = False
  5113.                                  .Item("Rewind").Enabled = False
  5114.                                  .Item("FastForward").Enabled = False
  5115.                                  .Item("SeekForward").Enabled = False
  5116.                                  .Item("SeekBackward").Enabled = False
  5117.                               End With
  5118.                               'update the state on the popup context menu
  5119.                               mnuTimeLinePlay.Enabled = True
  5120.                               mnuTimeLineStop.Enabled = False
  5121.                               mnuTimeLinePause.Enabled = True
  5122.                               mnuTimeLineRenderTimeLine.Enabled = False
  5123.                               mnuTimeLineClearRenderEngine.Enabled = False
  5124.                               'reset module-level filename
  5125.                               gbl_bstrLoadFile = Data.Files(nCount)
  5126.                               'reset the caption on the application's main form
  5127.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  5128.                               Me.Caption = "DexterVB - " & bstrFileName
  5129.                            End If
  5130.                         End If
  5131.                         'clean-up & dereference
  5132.                         If ObjPtr(objLocalTimeline) > 0 Then
  5133.                            Set objLocalTimeline = Nothing
  5134.                            Exit For
  5135.                         End If
  5136.                   End If
  5137.             Next
  5138.             Exit Sub
  5139.             
  5140. ErrLine:
  5141.             Err.Clear
  5142.             Exit Sub
  5143.             End Sub
  5144.             
  5145.             
  5146.             ' ******************************************************************************************************************************
  5147.             ' * procedure name: ctrlCoolBar_OLEDragOver
  5148.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  5149.             ' *
  5150.             ' ******************************************************************************************************************************
  5151.             Private Sub ctrlCoolBar_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  5152.             Dim nCount As Long
  5153.             Dim bstrFileName As String
  5154.             On Local Error GoTo ErrLine
  5155.             
  5156.             'do not allow drag n' drop operations when rendering..
  5157.             If ObjPtr(gbl_objQuartzVB) > 0 Then
  5158.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  5159.                   Effect = vbDropEffectNone
  5160.                   Exit Sub
  5161.                End If
  5162.             End If
  5163.             
  5164.             For nCount = 1 To Data.Files.Count
  5165.                   bstrFileName = Data.Files(nCount)
  5166.                   If Len(bstrFileName) > 4 Then
  5167.                         'verify the file extension is valid
  5168.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  5169.                            'at least it's been named an xtl file, proceed to attempt an import..
  5170.                            Effect = vbDropEffectCopy
  5171.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  5172.                         End If
  5173.                   End If
  5174.             Next
  5175.             Exit Sub
  5176.             
  5177. ErrLine:
  5178.             Err.Clear
  5179.             Exit Sub
  5180.             End Sub
  5181. ' **************************************************************************************************************************************
  5182. ' * PRIVATE INTERFACE- PROCEDURES
  5183.             ' ******************************************************************************************************************************
  5184.             ' * procedure name: ControlAvailable
  5185.             ' * procedure description:  returns true if the specified control exists within the context of this form
  5186.             ' *
  5187.             ' ******************************************************************************************************************************
  5188.             Private Function ControlAvailable(Index As Variant) As Boolean
  5189.             Dim ctrl As Control
  5190.             On Local Error GoTo ErrLine
  5191.             
  5192.             If ObjPtr(Me.Controls(Index)) > 0 Then
  5193.                ControlAvailable = True
  5194.             End If
  5195.             Exit Function
  5196.             
  5197. ErrLine:
  5198.            
  5199.             Err.Clear
  5200.             ControlAvailable = False
  5201.             Exit Function
  5202.             End Function
  5203.