home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / Create_AVI192143852005.psc / frmAvi.frm < prev   
Text File  |  2005-08-02  |  23KB  |  663 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form frmAVI 
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Create AVI from Picture Files"
  7.    ClientHeight    =   8370
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   6855
  11.    Icon            =   "frmAvi.frx":0000
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   8370
  15.    ScaleMode       =   0  'User
  16.    ScaleWidth      =   6855
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin VB.CommandButton cmdCancel 
  19.       Caption         =   "Cancel"
  20.       Enabled         =   0   'False
  21.       Height          =   255
  22.       Left            =   1440
  23.       TabIndex        =   4
  24.       Top             =   7200
  25.       Visible         =   0   'False
  26.       Width           =   1275
  27.    End
  28.    Begin VB.CheckBox chkShowImage 
  29.       Caption         =   "Show Images while creating"
  30.       Height          =   495
  31.       Left            =   1440
  32.       TabIndex        =   27
  33.       ToolTipText     =   "Slightly slower"
  34.       Top             =   7560
  35.       Value           =   1  'Checked
  36.       Width           =   1305
  37.    End
  38.    Begin VB.ListBox lstAVIPlayers 
  39.       Height          =   450
  40.       Left            =   3840
  41.       TabIndex        =   26
  42.       Top             =   7440
  43.       Width           =   1095
  44.    End
  45.    Begin VB.Frame fraCreateAVI 
  46.       Caption         =   "AVI Style"
  47.       Height          =   1095
  48.       Index           =   3
  49.       Left            =   120
  50.       TabIndex        =   21
  51.       Top             =   6960
  52.       Width           =   1215
  53.       Begin VB.PictureBox picCFXPBugFixfrmAVI 
  54.          BorderStyle     =   0  'None
  55.          Height          =   758
  56.          Index           =   2
  57.          Left            =   100
  58.          ScaleHeight     =   765
  59.          ScaleWidth      =   1020
  60.          TabIndex        =   22
  61.          Top             =   276
  62.          Width           =   1015
  63.          Begin VB.OptionButton optAVIStyle 
  64.             Caption         =   "Bounce"
  65.             Height          =   255
  66.             Index           =   2
  67.             Left            =   20
  68.             TabIndex        =   25
  69.             Top             =   492
  70.             Width           =   975
  71.          End
  72.          Begin VB.OptionButton optAVIStyle 
  73.             Caption         =   "Reverse"
  74.             Height          =   255
  75.             Index           =   1
  76.             Left            =   20
  77.             TabIndex        =   24
  78.             Top             =   237
  79.             Width           =   975
  80.          End
  81.          Begin VB.OptionButton optAVIStyle 
  82.             Caption         =   "Standard"
  83.             Height          =   255
  84.             Index           =   0
  85.             Left            =   20
  86.             TabIndex        =   23
  87.             Top             =   -18
  88.             Value           =   -1  'True
  89.             Width           =   975
  90.          End
  91.       End
  92.    End
  93.    Begin VB.CommandButton cmdPlayAVI 
  94.       Caption         =   "Play Using"
  95.       Enabled         =   0   'False
  96.       Height          =   375
  97.       Left            =   3840
  98.       TabIndex        =   20
  99.       Top             =   6960
  100.       Width           =   1155
  101.    End
  102.    Begin VB.CommandButton cmdClose 
  103.       Caption         =   "Close"
  104.       Height          =   375
  105.       Left            =   5520
  106.       TabIndex        =   7
  107.       Top             =   7560
  108.       Width           =   1275
  109.    End
  110.    Begin VB.Frame fraCreateAVI 
  111.       Caption         =   "Image"
  112.       Height          =   5145
  113.       Index           =   2
  114.       Left            =   60
  115.       TabIndex        =   6
  116.       Top             =   1740
  117.       Width           =   6765
  118.       Begin VB.PictureBox picCFXPBugFixfrmAVI 
  119.          BorderStyle     =   0  'None
  120.          Height          =   4815
  121.          Index           =   1
  122.          Left            =   100
  123.          ScaleHeight     =   4815
  124.          ScaleWidth      =   6570
  125.          TabIndex        =   17
  126.          Top             =   276
  127.          Width           =   6570
  128.          Begin VB.PictureBox imShow 
  129.             AutoRedraw      =   -1  'True
  130.             BackColor       =   &H8000000C&
  131.             Height          =   5000
  132.             Left            =   -45
  133.             ScaleHeight     =   4935
  134.             ScaleWidth      =   6615
  135.             TabIndex        =   19
  136.             Top             =   -315
  137.             Width           =   6675
  138.          End
  139.          Begin VB.PictureBox imL 
  140.             AutoSize        =   -1  'True
  141.             BackColor       =   &H8000000C&
  142.             Height          =   315
  143.             Left            =   4320
  144.             ScaleHeight     =   255
  145.             ScaleWidth      =   585
  146.             TabIndex        =   18
  147.             Top             =   4440
  148.             Visible         =   0   'False
  149.             Width           =   645
  150.          End
  151.       End
  152.    End
  153.    Begin VB.Frame fraCreateAVI 
  154.       Caption         =   "Options"
  155.       Height          =   1095
  156.       Index           =   1
  157.       Left            =   60
  158.       TabIndex        =   5
  159.       Top             =   60
  160.       Width           =   6765
  161.       Begin VB.PictureBox picCFXPBugFixfrmAVI 
  162.          BorderStyle     =   0  'None
  163.          Height          =   758
  164.          Index           =   0
  165.          Left            =   100
  166.          ScaleHeight     =   765
  167.          ScaleWidth      =   6570
  168.          TabIndex        =   8
  169.          Top             =   276
  170.          Width           =   6570
  171.          Begin VB.CommandButton cmdFastAutoName 
  172.             Caption         =   "Fast Auto Name"
  173.             Height          =   735
  174.             Left            =   1680
  175.             TabIndex        =   28
  176.             Top             =   0
  177.             Width           =   735
  178.          End
  179.          Begin VB.CommandButton cmdFiles 
  180.             Caption         =   "..."
  181.             Height          =   315
  182.             Index           =   0
  183.             Left            =   5985
  184.             TabIndex        =   11
  185.             Top             =   -18
  186.             Width           =   525
  187.          End
  188.          Begin VB.CommandButton cmdFiles 
  189.             Caption         =   "..."
  190.             Height          =   315
  191.             Index           =   1
  192.             Left            =   5985
  193.             TabIndex        =   10
  194.             Top             =   402
  195.             Width           =   525
  196.          End
  197.          Begin VB.TextBox txtFPS 
  198.             Alignment       =   2  'Center
  199.             Height          =   285
  200.             Left            =   120
  201.             TabIndex        =   9
  202.             Text            =   "10"
  203.             Top             =   480
  204.             Width           =   675
  205.          End
  206.          Begin VB.Label lblCreateAVI 
  207.             Alignment       =   1  'Right Justify
  208.             Caption         =   "Destination:"
  209.             Height          =   255
  210.             Index           =   1
  211.             Left            =   2775
  212.             TabIndex        =   16
  213.             Top             =   435
  214.             Width           =   855
  215.          End
  216.          Begin VB.Label lblCreateAVI 
  217.             Alignment       =   1  'Right Justify
  218.             Caption         =   "Source:"
  219.             Height          =   255
  220.             Index           =   2
  221.             Left            =   2865
  222.             TabIndex        =   15
  223.             Top             =   45
  224.             Width           =   765
  225.          End
  226.          Begin VB.Label lblCreateAVI 
  227.             BackColor       =   &H00E0E0E0&
  228.             BorderStyle     =   1  'Fixed Single
  229.             Caption         =   "First Picture File -> Browse ->"
  230.             ForeColor       =   &H00000000&
  231.             Height          =   285
  232.             Index           =   4
  233.             Left            =   3735
  234.             TabIndex        =   14
  235.             Top             =   15
  236.             Width           =   2175
  237.          End
  238.          Begin VB.Label lblCreateAVI 
  239.             BackColor       =   &H00E0E0E0&
  240.             BorderStyle     =   1  'Fixed Single
  241.             Caption         =   "AVI File -> Browse ->"
  242.             ForeColor       =   &H00000000&
  243.             Height          =   285
  244.             Index           =   3
  245.             Left            =   3735
  246.             TabIndex        =   13
  247.             Top             =   405
  248.             Width           =   2175
  249.          End
  250.          Begin VB.Label lblCreateAVI 
  251.             Caption         =   "FPS: ( 0.1 to 50) Small = slow"
  252.             Height          =   375
  253.             Index           =   0
  254.             Left            =   15
  255.             TabIndex        =   12
  256.             Top             =   45
  257.             Width           =   1155
  258.          End
  259.       End
  260.    End
  261.    Begin MSComDlg.CommonDialog cdlCreateAVI 
  262.       Left            =   3000
  263.       Top             =   7200
  264.       _ExtentX        =   847
  265.       _ExtentY        =   847
  266.       _Version        =   393216
  267.    End
  268.    Begin VB.CommandButton cmdCreate 
  269.       Caption         =   "Create AVI"
  270.       Enabled         =   0   'False
  271.       Height          =   375
  272.       Left            =   1440
  273.       TabIndex        =   3
  274.       Top             =   7080
  275.       Width           =   1275
  276.    End
  277.    Begin MSComctlLib.StatusBar sBar 
  278.       Align           =   2  'Align Bottom
  279.       Height          =   285
  280.       Left            =   0
  281.       TabIndex        =   2
  282.       Top             =   8085
  283.       Width           =   6855
  284.       _ExtentX        =   12091
  285.       _ExtentY        =   503
  286.       Style           =   1
  287.       _Version        =   393216
  288.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  289.          NumPanels       =   1
  290.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  291.          EndProperty
  292.       EndProperty
  293.    End
  294.    Begin VB.Frame fraCreateAVI 
  295.       Caption         =   "Progress"
  296.       Height          =   555
  297.       Index           =   0
  298.       Left            =   60
  299.       TabIndex        =   0
  300.       Top             =   1170
  301.       Width           =   6765
  302.       Begin VB.PictureBox picCreateAVI 
  303.          Height          =   255
  304.          Left            =   120
  305.          ScaleHeight     =   195
  306.          ScaleWidth      =   6465
  307.          TabIndex        =   1
  308.          Top             =   240
  309.          Width           =   6525
  310.       End
  311.    End
  312. End
  313. Attribute VB_Name = "frmAVI"
  314. Attribute VB_GlobalNameSpace = False
  315. Attribute VB_Creatable = False
  316. Attribute VB_PredeclaredId = True
  317. Attribute VB_Exposed = False
  318. Option Explicit
  319. 'PURPOSE
  320. ' Convert ordered collections of bmp, jpg or gif files into AVI files
  321. '
  322. 'Based on
  323. 'Ron Hoebe's 'Create AVI'
  324. 'http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=29517&lngWId=1
  325. 'AND
  326. 'NeO78's  'PDF Printer Class'
  327. 'http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=61936&lngWId=1
  328. 'which showed mee how to search disk for specific files
  329. '
  330. 'ProgressBar & Estimated time
  331. '__merlin__'s 'ProgressBar2Class (8 DrawDirections, XOR Caption,Time2End Display)'
  332. 'http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=23431&lngWId=1
  333. '
  334. 'MODIFICATIONS by roger gilchrist
  335. '(apart from a little tidying up all the modifications are in the code on this form and ModFindFile)
  336. '1 Ignores non-graphic files in the folder (original tried to load all files in folder and crashed if it found non-graphics)
  337. '2 Side effect of 1 is to allow writing the AVI to the same folder as the source files.
  338. '3 Added Reverse Style(Images inserted in reverse order of alphanumeric sort)
  339. '4 Added Bounce  Style(Standard + Reverse but turnaround image not doubled and last frame = 2nd image)
  340. '  This means that you can run the AVI as a continuous loop without an apparent pause as it wraps around
  341. '5 Added Play AVI from program using AVI Players on the system.
  342. '  Program is coded to search for Windows Media Player and WinAmp
  343. '  You can add others by modifying the list in GetAVIPlayers (details in the procedure)
  344. '
  345. 'VERSION 2
  346. '6 Added 'Fast Auto Name' Uses FolderBrowser for simpler folder selection and automatic AVI file name
  347. '   Use if you are sure of where the files are
  348. '7 Modified the FPS to allow fractions. At 0.1 each picture will last about 3 seconds
  349. '8 improved button activation and deactivation
  350. '
  351. 'USAGE
  352. '1 Place all files you wish to make into an AVI in single folder.
  353. '2 All files need to be same size as each other (typical of captures from film or screen captures)
  354. '3 Sort the folder to create the base order (normally sorted by name if using captures with auto numbering schemes)
  355. '4 Try out the FPS, different codec and compression schemes offered(See WARNING 2 below) on small sets of images first until you find what suits you best.
  356. '5 Select the first file in the folder (this will be used to set the basic size of the AVI frames)
  357. '6 Create a name for the target AVI file.
  358. '7 Select a Style (default Standard)
  359. '8 Steps 5 & 6 activate the 'Create AVI' button
  360. '9 Click the button and go have a coffee.
  361. '10 You can launch the AVI in AVI player(s) from the program (Modification 5)
  362. '
  363. '<<<<<<<<<<<<<<<<<<<<<<<<<<  WARNINGS   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  364. '1 If any file is not the same size as others it will distort badly (and may corrupt the AVI)
  365. '2 The codecs listed are those detected on your machine however you may not be able to use them all
  366. '  due to licencing restrictions, incomplete installation or uninstalling errors.
  367. '3 Building AVI's can be slow (the more compression you use the worse it will be)
  368. '4 Interrupting constuction may create an unusable AVI
  369. '5 Corrupt AVI's may cause the Folder Explorer to crash.
  370. '   (Especially if the folder is set to display thumbnails)
  371. '6 If 5 occurs restart Windows, open the folder containing the AVI
  372. '  (You may have to force it out of thumbnail view first
  373. '     a. select another folder
  374. '     b. set to details view
  375. '     c. Use the Tools|Folder Options menu View Tab 'Apply to All Folders' button
  376. '   Delete the AVI
  377. '7 If you build your image set by frame capture from a DVD you will almost certainly be violating copyright laws.
  378. '<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  379. '
  380. '<<<<<< DISCLAIMER >>>>>>>>>>>>>>>>
  381. 'All care no responsibility
  382. 'Code is supplied 'as is'
  383. 'Code has been tested and is capable of produicng AVI files
  384. 'BUT is also capable of disrupting (temporarily) your system (See WARNINGS 4,5,6)
  385. '<<<<<< DISCLAIMER >>>>>>>>>>>>>>>>
  386. '
  387. Private arrFile              As Variant
  388. Private strLastFolder        As String
  389. Private cBar                 As ClsProgressBar2
  390. Private bmp                  As cDIB
  391. Private fpath                As String
  392. Private szOutputAVIFile      As String
  393. Private szInputFile          As String
  394. Private docancel             As Boolean
  395. Private fDest                As Boolean
  396. Private fSrc                 As Boolean
  397. Private StrWMP               As String
  398. Private Players()            As String
  399. Private PlayerCount          As Long
  400.  
  401.  
  402. Private Function AddAFrame(psCompressed As Long, _
  403.                            VarFileName As Variant, _
  404.                            Counter As Long, _
  405.                            res As Long) As Long
  406.  
  407.   With cBar 'update the progbar
  408.     .Value = Counter
  409.     fraCreateAVI(0).Caption = "Estimated Time Remaining " & .Time2End
  410.     .ShowBar
  411.   End With 'cBar
  412.   DoEvents ' this allows you to interupt the process
  413.   sBar.SimpleText = "Adding " & FlleNameOnly(CStr(VarFileName))
  414.   bmp.CreateFromFile (loadPic(strLastFolder & "\" & VarFileName, chkShowImage = vbChecked, False, True))
  415.   res = AVIStreamWrite(psCompressed, Counter, 1, bmp.PointerToBits, bmp.SizeImage, AVIIF_KEYFRAME, ByVal 0&, ByVal 0&)
  416.   If res = AVIERR_OK Then
  417.     AddAFrame = True
  418.   End If
  419.   If docancel Then
  420.     AddAFrame = False
  421.   End If
  422.  
  423. End Function
  424.  
  425. Private Sub ButtonSet(ByVal bEnabled As Boolean)
  426.  
  427.   Dim I As Long
  428.  
  429.   docancel = bEnabled
  430.   cmdCancel.Visible = Not bEnabled
  431.   cmdCancel.Enabled = Not bEnabled
  432.   cmdClose.Enabled = bEnabled
  433.   For I = 0 To 1
  434.     cmdFiles(I).Enabled = bEnabled
  435.   Next I
  436.   cmdCreate.Visible = bEnabled
  437.   fraCreateAVI(0).Caption = vbNullString
  438.  
  439. End Sub
  440.  
  441. Private Sub CloseAviWriting(psCompressed As Long, _
  442.                             pfile As Long, _
  443.                             ps As Long, _
  444.                             ByVal res As Long)
  445.  
  446.   If ps <> 0 Then
  447.     AVIStreamClose ps
  448.   End If
  449.   If psCompressed <> 0 Then
  450.     AVIStreamClose psCompressed
  451.   End If
  452.   If pfile <> 0 Then
  453.     AVIFileClose pfile
  454.   End If
  455.   AVIFileExit
  456.   If res <> AVIERR_OK Then
  457.     If res = AVIERR_BADFORMAT Or res = AVIERR_INTERNAL Then
  458.       MsgBox "There was an error creating the AVI File." & vbNewLine & _
  459.        "Probably the choosen Video Compression does not support the File format or the input File is corrupt", vbInformation, App.Title
  460.       sBar.SimpleText = "There was an error writing the file."
  461.      Else
  462.       MsgBox "There was an error creating the AVI File.", vbInformation, App.Title
  463.       sBar.SimpleText = "There was an error writing the file."
  464.     End If
  465.    Else
  466.     sBar.SimpleText = "Created " & FlleNameOnly(CStr(szOutputAVIFile))
  467.     If cmdPlayAVI.Visible Then
  468.       cmdPlayAVI.Enabled = True
  469.     End If
  470.   End If
  471.  
  472. End Sub
  473.  
  474. Private Sub cmdCancel_Click()
  475.  
  476.   docancel = True
  477.  
  478. End Sub
  479.  
  480. Private Sub cmdClose_Click()
  481.  
  482.   Unload Me
  483.  
  484. End Sub
  485.  
  486. Private Sub cmdCreate_Click()
  487.  
  488.   Dim res          As Long
  489.   Dim pfile        As Long   'ptr PAVIFILE
  490.   Dim ps           As Long   'ptr PAVISTREAM
  491.   Dim psCompressed As Long   'ptr PAVISTREAM
  492.   Dim FrameTime    As Long   'Frame counter and time remaining counter
  493.   Dim J            As Long   'loop through file array
  494.  
  495.   ButtonSet False
  496.   If InitAviWriting(psCompressed, pfile, ps) Then
  497. '  arrFile = GetFileArray(fpath)
  498. 'initialize the progbar
  499.     With cBar
  500.       .SetParamFast 1, UBound(arrFile) * IIf(optAVIStyle(2).Value, 2, 1), Left2Right, True, ShowCaptionL
  501.       .Value = 1
  502.       .StartTimer
  503.     End With 'cBar
  504.     Select Case True
  505.      Case optAVIStyle(0).Value  'Standard
  506.       cBar.Caption = "Standard"
  507.       For J = 0 To UBound(arrFile)
  508.         FrameTime = FrameTime + 1
  509.         If Not AddAFrame(psCompressed, arrFile(J), FrameTime, res) Then
  510.           Exit For
  511.         End If
  512.       Next J
  513.      Case optAVIStyle(1).Value  'Reverse
  514.       cBar.Caption = "Reverse"
  515.       For J = UBound(arrFile) To 0 Step -1
  516.         FrameTime = FrameTime + 1
  517.         If Not AddAFrame(psCompressed, arrFile(J), FrameTime, res) Then
  518.           Exit For
  519.         End If
  520.       Next J
  521.      Case optAVIStyle(2).Value  'Bounce
  522.       cBar.Caption = "Bounce"
  523.       For J = 0 To UBound(arrFile)
  524.         FrameTime = FrameTime + 1
  525.         If Not AddAFrame(psCompressed, arrFile(J), FrameTime, res) Then
  526.           GoTo error 'Exit For
  527.         End If
  528.       Next J
  529.       For J = UBound(arrFile) - 1 To 1 Step -1
  530.         FrameTime = FrameTime + 1
  531.         If Not AddAFrame(psCompressed, arrFile(J), FrameTime, res) Then
  532.           Exit For
  533.         End If
  534.       Next J
  535.     End Select
  536.   End If
  537. error:
  538.   CloseAviWriting psCompressed, pfile, ps, res
  539.   cBar.Value = 1
  540.   cBar.ShowBar
  541.   ButtonSet True
  542.   cmdCreate.Enabled = False
  543.  
  544. End Sub
  545.  
  546. Private Sub cmdFastAutoName_Click()
  547.  
  548.   Dim strfolder As String
  549.   Dim Counter   As Long
  550.  
  551.   strfolder = Browse_Folder(strLastFolder, "Select a folder") ', 0)
  552.   If LenB(strfolder) Then
  553.     strLastFolder = strfolder
  554.     arrFile = GetFileArray(strLastFolder)
  555.     If LenB(arrFile(0)) Then
  556.       szInputFile = strLastFolder & "\" & arrFile(0)
  557.       loadPic szInputFile, chkShowImage = vbChecked, True, False
  558.       lblCreateAVI(4).Caption = FlleNameOnly(szInputFile)
  559. 'avi name based on foldername
  560.       szOutputAVIFile = strfolder & "\" & FlleNameOnly(strfolder) & ".avi"
  561.       If FileExists(szOutputAVIFile) Then
  562. 'if already is an AVI of that name then create a numbered name
  563.         Do While FileExists(strfolder & "\" & FlleNameOnly(strfolder) & Format$(Counter, "000") & ".avi")
  564.           Counter = Counter + 1
  565.         Loop
  566.         szOutputAVIFile = strfolder & "\" & FlleNameOnly(strfolder) & Format$(Counter, "000") & ".avi"
  567.       End If
  568.       lblCreateAVI(3).Caption = FlleNameOnly(szOutputAVIFile)
  569.       cmdCreate.Enabled = True
  570.      Else
  571.       MsgBox "No suitable source files found in folder '" & FlleNameOnly(strfolder) & "'.", vbInformation
  572.     End If
  573.     
  574.   End If
  575.   cmdPlayAVI.Enabled = False
  576. End Sub
  577.  
  578. Private Sub cmdFiles_Click(Index As Integer)
  579.  
  580.   Select Case Index
  581.    Case 0 '...
  582.     fSrc = SrcFile
  583.     If fSrc Then
  584.       loadPic szInputFile, chkShowImage = vbChecked, True, False
  585.       strLastFolder = GetFilePath(szInputFile)
  586.     End If
  587.    Case 1 '...
  588.     fDest = DestFile
  589.   End Select
  590.   cmdCreate.Enabled = fSrc And fDest
  591.  
  592. End Sub
  593.  
  594. Private Sub cmdPlayAVI_Click()
  595.  
  596.   Shell Players(lstAVIPlayers.ListIndex) & " " & Chr$(34) & szOutputAVIFile & Chr$(34), vbNormalFocus
  597.  
  598. End Sub
  599.  
  600. Private Function DestFile() As Boolean
  601.  
  602.   With cdlCreateAVI
  603.     .DialogTitle = "Save AVI File"
  604.     .CancelError = False
  605.     .Filter = "AVI Files (*.avi)|*.avi"
  606.     .DefaultExt = "avi"
  607.     .FileName = vbNullString
  608.     .ShowSave
  609.   End With
  610.   If Len(cdlCreateAVI.FileName) = 0 Then
  611.     DestFile = False
  612.    Else
  613.     szOutputAVIFile = cdlCreateAVI.FileName
  614.     lblCreateAVI(3).Caption = FlleNameOnly(szOutputAVIFile)
  615.     DestFile = True
  616.   End If
  617.  
  618. End Function
  619.  
  620. Private Sub Form_Load()
  621.  
  622.   Set fso = CreateObject("Scripting.FileSystemObject")
  623.   Set cBar = New ClsProgressBar2
  624.   cBar.SetPictureBox = picCreateAVI
  625.   fSrc = False
  626.   fDest = False
  627.   GetAVIPlayers
  628.  
  629. End Sub
  630.  
  631. Private Sub Form_Unload(Cancel As Integer)
  632.  
  633.   Set bmp = Nothing
  634.   Set cBar = Nothing
  635.   Set fso = Nothing
  636.  
  637. End Sub
  638.  
  639. Private Sub GetAVIPlayers()
  640.  
  641.   Dim strTmp      As String
  642.   Dim PlayerCount As Long
  643.   Dim I           As Long
  644.   Dim ArrPlayers  As Variant
  645.   Dim aPlayer     As Variant
  646.  
  647. 'NOTE if any players are found in standard locations ("C:\Program Files....) then the all disks search will not be preformed
  648. 'You can either recode this or open the Registry and edit the values by hand to include the non-standard paths
  649. '
  650. 'MODIFICATION POINT 1
  651. 'to add/delete players modify the next line to include/exclude players
  652.   ArrPlayers = Array("wmplayer.exe", "winamp.exe")
  653. 'MODIFICATION POINT 2
  654. 'if you have already run the program and wish to change the player list uncomment the next line, run in VB then comment it
  655. ' SaveSetting App.EXEName, "OPTIONS", "PlayerCount", 0
  656. 'line above this deletes the PlayerCount Value of the key and forces program to search for players
  657. '
  658.   PlayerCount = GetSetting(App.EXEName, "OPTIONS", "PlayerCount", 0)
  659.   If PlayerCount = 0 Then
  660.     MsgBox "This is the first  ThiFormat$ Set craU 1
  661.          w     =   6765
  662.       Begin VB.PictureBox picCreateAN POINT 2
  663. 'if you have already rucBaryx picCr