www.pudn.com > pdng22src.zip > frmConfig.frm


VERSION 5.00 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Begin VB.Form frmConfig  
   BackColor       =   &H00000000& 
   BorderStyle     =   1  'Fixed Single 
   Caption         =   "Configuration" 
   ClientHeight    =   4935 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   4530 
   ControlBox      =   0   'False 
   Icon            =   "frmConfig.frx":0000 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   4935 
   ScaleWidth      =   4530 
   StartUpPosition =   2  'CenterScreen 
   Begin VB.Frame Frame3  
      BackColor       =   &H00000000& 
      Caption         =   "Register with Avi" 
      ForeColor       =   &H00FFFFFF& 
      Height          =   1275 
      Left            =   150 
      TabIndex        =   12 
      Top             =   3090 
      Width           =   4215 
      Begin VB.CommandButton Command3  
         Caption         =   "Choose..." 
         Height          =   375 
         Left            =   3150 
         TabIndex        =   13 
         Top             =   240 
         Width           =   945 
      End 
      Begin MSComctlLib.Slider Slider1  
         Height          =   225 
         Left            =   1620 
         TabIndex        =   16 
         Top             =   900 
         Width           =   2385 
         _ExtentX        =   4207 
         _ExtentY        =   397 
         _Version        =   393216 
         Max             =   20 
         Value           =   5 
      End 
      Begin VB.Shape Shape2  
         BackColor       =   &H8000000F& 
         BackStyle       =   1  'Opaque 
         BorderColor     =   &H000080FF& 
         Height          =   375 
         Left            =   1500 
         Top             =   810 
         Width           =   2565 
      End 
      Begin VB.Shape Shape1  
         BackColor       =   &H0080C0FF& 
         BackStyle       =   1  'Opaque 
         Height          =   435 
         Left            =   1470 
         Top             =   780 
         Width           =   2625 
      End 
      Begin VB.Label Label4  
         BackStyle       =   0  'Transparent 
         Caption         =   "Subtitles delay" 
         BeginProperty Font  
            Name            =   "MS Sans Serif" 
            Size            =   8.25 
            Charset         =   0 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0080C0FF& 
         Height          =   255 
         Left            =   90 
         TabIndex        =   15 
         Top             =   900 
         UseMnemonic     =   0   'False 
         Width           =   1425 
      End 
      Begin VB.Label Label2  
         BackStyle       =   0  'Transparent 
         Caption         =   "Subtitles Font & color =>" 
         BeginProperty Font  
            Name            =   "MS Sans Serif" 
            Size            =   8.25 
            Charset         =   0 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0080C0FF& 
         Height          =   405 
         Left            =   690 
         TabIndex        =   14 
         Top             =   315 
         UseMnemonic     =   0   'False 
         Width           =   2175 
      End 
      Begin VB.Image Image2  
         Height          =   480 
         Left            =   30 
         Picture         =   "frmConfig.frx":1042 
         Top             =   270 
         Width           =   480 
      End 
   End 
   Begin VB.ListBox ListSub3  
      Height          =   2790 
      Left            =   6795 
      TabIndex        =   11 
      Top             =   5205 
      Width           =   2070 
   End 
   Begin VB.ListBox ListSub2  
      Height          =   2790 
      Left            =   4620 
      TabIndex        =   10 
      Top             =   5205 
      Width           =   2070 
   End 
   Begin VB.ListBox ListEnd  
      Height          =   2790 
      Left            =   1365 
      TabIndex        =   9 
      Top             =   5205 
      Width           =   1185 
   End 
   Begin VB.ListBox ListBegin  
      Height          =   2790 
      Left            =   150 
      TabIndex        =   8 
      Top             =   5205 
      Width           =   1125 
   End 
   Begin VB.ListBox ListSub  
      Height          =   2790 
      Left            =   2610 
      TabIndex        =   7 
      Top             =   5205 
      Width           =   1920 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "&Close" 
      Height          =   375 
      Left            =   3510 
      TabIndex        =   4 
      Top             =   4500 
      Width           =   945 
   End 
   Begin VB.Frame Frame2  
      BackColor       =   &H00000000& 
      Caption         =   "Register with Avi" 
      ForeColor       =   &H00FFFFFF& 
      Height          =   1395 
      Left            =   150 
      TabIndex        =   3 
      Top             =   1650 
      Width           =   4215 
      Begin VB.CommandButton Command2  
         BackColor       =   &H00000000& 
         Caption         =   "Register" 
         Height          =   375 
         Left            =   3180 
         TabIndex        =   5 
         Top             =   900 
         Width           =   915 
      End 
      Begin VB.Image Image1  
         Height          =   480 
         Left            =   30 
         Picture         =   "frmConfig.frx":2084 
         Top             =   270 
         Width           =   480 
      End 
      Begin VB.Label Label1  
         BackStyle       =   0  'Transparent 
         Caption         =   "PowerDivX NG has a shell integration: right-click and Play with PowerDivX." 
         BeginProperty Font  
            Name            =   "MS Sans Serif" 
            Size            =   8.25 
            Charset         =   0 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0080C0FF& 
         Height          =   480 
         Left            =   600 
         TabIndex        =   6 
         Top             =   300 
         Width           =   3615 
      End 
   End 
   Begin VB.Frame Frame1  
      BackColor       =   &H00000000& 
      Caption         =   "Audio" 
      ForeColor       =   &H00FFFFFF& 
      Height          =   1395 
      Left            =   150 
      TabIndex        =   0 
      Top             =   180 
      Width           =   4215 
      Begin VB.ComboBox Combo1  
         Height          =   315 
         Left            =   570 
         Style           =   2  'Dropdown List 
         TabIndex        =   1 
         Top             =   900 
         Width           =   2250 
      End 
      Begin VB.Image Image5  
         Height          =   375 
         Left            =   3210 
         Picture         =   "frmConfig.frx":30C6 
         Stretch         =   -1  'True 
         Top             =   960 
         Width           =   945 
      End 
      Begin VB.Label Label3  
         BackStyle       =   0  'Transparent 
         Caption         =   "PowerDivX NG need to be restarted after changes." 
         BeginProperty Font  
            Name            =   "MS Sans Serif" 
            Size            =   8.25 
            Charset         =   0 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0080C0FF& 
         Height          =   480 
         Left            =   570 
         TabIndex        =   2 
         Top             =   270 
         Width           =   3615 
      End 
      Begin VB.Image Image11  
         Height          =   480 
         Left            =   0 
         Picture         =   "frmConfig.frx":3B56 
         Top             =   240 
         Width           =   480 
      End 
   End 
End 
Attribute VB_Name = "frmConfig" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
 
 
Private Sub Combo1_Click() 
Dim retval, qnr, file$, temp$, neo 
Select Case Combo1.ListIndex 
Case 0 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\Mono.iwc" + """") 
Case 1 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\Stereo.iwc" + """") 
Case 2 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\DolbySurround.iwc" + """") 
Case 3 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\3DAudio.iwc" + """") 
Case 4 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\4Speakers.iwc" + """") 
Case 5 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\6Speakers.iwc" + """") 
Case 6 
retval = Shell(WinDir + "\regedit.exe /s " + """" + App.Path + "\Decoder\Spdif.iwc" + """") 
End Select 
'On Error Resume Next 
 
For neo = 0 To 6 
If EXISTE(App.Path + "\Ac3reg" & neo & ".cfg") Then 
Kill (App.Path + "\Ac3reg" & neo & ".cfg") 
End If 
Next neo 
 
On Error Resume Next 
qnr = FreeFile 
file$ = App.Path + "\Ac3reg" & Combo1.ListIndex & ".cfg" 
Open file$ For Output As #qnr 
temp$ = "This file is a file !" 
Print #qnr, temp$ 
Close #qnr 
 
End Sub 
 
Private Sub Command1_Click() 
Me.Hide 
End Sub 
 
Private Sub Command2_Click() 
retval = Shell(App.Path & "\regavi.bat", vbHide) 
MsgBox "Done !", vbInformation 
End Sub 
 
Private Sub Command3_Click() 
    ' Attribue à CancelError la valeur True 
    frmMain.CommonDialog1.CancelError = True 
    On Error GoTo ErrHandler 
    ' Définit la propriété Flags 
    frmMain.CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth 
     
    frmMain.CommonDialog1.FontName = frmSub.Sub1.Font.Name 
    frmMain.CommonDialog1.FontSize = frmSub.Sub1.Font.Size 
    frmMain.CommonDialog1.Color = frmSub.Sub1.ForeColor 
     
    ' Affiche la boîte de dialogue Police 
    frmMain.CommonDialog1.ShowFont 
    frmSub.Sub1.Font.Name = frmMain.CommonDialog1.FontName 
    frmSub.Sub1.Font.Size = frmMain.CommonDialog1.FontSize 
    frmSub.Sub1.ForeColor = frmMain.CommonDialog1.Color 
     
    frmSub.Sub2.Font.Name = frmMain.CommonDialog1.FontName 
    frmSub.Sub2.Font.Size = frmMain.CommonDialog1.FontSize 
    frmSub.Sub2.ForeColor = frmMain.CommonDialog1.Color 
 
    frmSub.Sub3.Font.Name = frmMain.CommonDialog1.FontName 
    frmSub.Sub3.Font.Size = frmMain.CommonDialog1.FontSize 
    frmSub.Sub3.ForeColor = frmMain.CommonDialog1.Color 
 
    Exit Sub 
ErrHandler: 
    ' L'utilisateur a cliqué sur Annuler 
    Exit Sub 
 
End Sub