home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / Chip_2003-01_cd2.bin / editors / songs / SoundEngine / vbmp31615.lzh / sample.LZH / frmSiInput.frm (.txt) < prev    next >
Visual Basic Form  |  2000-05-11  |  18KB  |  579 lines

  1. VERSION 5.00
  2. Begin VB.Form frmSiInput 
  3.    Caption         =   "SI
  4.    ClientHeight    =   5925
  5.    ClientLeft      =   2115
  6.    ClientTop       =   6345
  7.    ClientWidth     =   7920
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   5925
  10.    ScaleWidth      =   7920
  11.    StartUpPosition =   1  '
  12.    Begin VB.CommandButton cmdCutID3v2 
  13.       Caption         =   "ID3Tag v2
  14.       Height          =   375
  15.       Left            =   2700
  16.       TabIndex        =   44
  17.       Top             =   5520
  18.       Width           =   1575
  19.    End
  20.    Begin VB.TextBox txtListISBJ 
  21.       Height          =   270
  22.       Left            =   1080
  23.       TabIndex        =   42
  24.       Top             =   4440
  25.       Width           =   6735
  26.    End
  27.    Begin VB.TextBox txtListIMED 
  28.       Height          =   270
  29.       Left            =   1080
  30.       TabIndex        =   40
  31.       Top             =   4080
  32.       Width           =   6735
  33.    End
  34.    Begin VB.TextBox txtListIMP3 
  35.       Height          =   270
  36.       Left            =   1080
  37.       TabIndex        =   38
  38.       Top             =   4800
  39.       Width           =   6735
  40.    End
  41.    Begin VB.CommandButton btOpen 
  42.       Caption         =   "open"
  43.       Height          =   255
  44.       Left            =   6840
  45.       TabIndex        =   37
  46.       Top             =   120
  47.       Width           =   855
  48.    End
  49.    Begin VB.TextBox txtFile 
  50.       Height          =   270
  51.       Left            =   1080
  52.       TabIndex        =   0
  53.       Top             =   120
  54.       Width           =   5655
  55.    End
  56.    Begin VB.CheckBox chkChgExp 
  57.       Caption         =   "
  58.       Height          =   255
  59.       Left            =   6240
  60.       TabIndex        =   35
  61.       Top             =   5160
  62.       Value           =   1  '
  63.       Width           =   1575
  64.    End
  65.    Begin VB.CommandButton cmdCutMacBin 
  66.       Caption         =   "Mac
  67.       Height          =   375
  68.       Left            =   1140
  69.       TabIndex        =   34
  70.       Top             =   5520
  71.       Width           =   1575
  72.    End
  73.    Begin VB.CommandButton cmdChgMp3 
  74.       Caption         =   "RIFF->MP3"
  75.       Height          =   375
  76.       Left            =   4260
  77.       TabIndex        =   33
  78.       Top             =   5160
  79.       Width           =   1575
  80.    End
  81.    Begin VB.CommandButton cmdChgWav 
  82.       Caption         =   "MP3->RIFF WAV"
  83.       Height          =   375
  84.       Left            =   2700
  85.       TabIndex        =   32
  86.       Top             =   5160
  87.       Width           =   1575
  88.    End
  89.    Begin VB.CommandButton cmdChgRmp 
  90.       Caption         =   "MP3->RIFF MP3"
  91.       Height          =   375
  92.       Left            =   1140
  93.       TabIndex        =   31
  94.       Top             =   5160
  95.       Width           =   1575
  96.    End
  97.    Begin VB.CommandButton cmdReg 
  98.       Caption         =   "
  99.       Default         =   -1  'True
  100.       Height          =   375
  101.       Left            =   5820
  102.       TabIndex        =   30
  103.       Top             =   5520
  104.       Width           =   975
  105.    End
  106.    Begin VB.CommandButton cmdCancel 
  107.       Cancel          =   -1  'True
  108.       Caption         =   "
  109.       Height          =   375
  110.       Left            =   6900
  111.       TabIndex        =   29
  112.       Top             =   5520
  113.       Width           =   975
  114.    End
  115.    Begin VB.TextBox txtListICMS 
  116.       Height          =   270
  117.       Left            =   4920
  118.       TabIndex        =   28
  119.       Top             =   3360
  120.       Width           =   2895
  121.    End
  122.    Begin VB.TextBox txtListITCH 
  123.       Height          =   270
  124.       Left            =   1080
  125.       TabIndex        =   27
  126.       Top             =   3360
  127.       Width           =   2895
  128.    End
  129.    Begin VB.TextBox txtListIKEY 
  130.       Height          =   270
  131.       Left            =   4920
  132.       TabIndex        =   26
  133.       Top             =   3000
  134.       Width           =   2895
  135.    End
  136.    Begin VB.TextBox txtListISFT 
  137.       Height          =   270
  138.       Left            =   1080
  139.       TabIndex        =   25
  140.       Top             =   3000
  141.       Width           =   2895
  142.    End
  143.    Begin VB.TextBox txtListIGNR 
  144.       Height          =   270
  145.       Left            =   4920
  146.       TabIndex        =   24
  147.       Top             =   1920
  148.       Width           =   2895
  149.    End
  150.    Begin VB.TextBox txtListICRD 
  151.       Height          =   270
  152.       Left            =   1080
  153.       TabIndex        =   23
  154.       Top             =   1920
  155.       Width           =   2895
  156.    End
  157.    Begin VB.TextBox txtListISRC 
  158.       Height          =   270
  159.       Left            =   4920
  160.       TabIndex        =   22
  161.       Top             =   2640
  162.       Width           =   2895
  163.    End
  164.    Begin VB.TextBox txtListIENG 
  165.       Height          =   270
  166.       Left            =   1080
  167.       TabIndex        =   21
  168.       Top             =   2640
  169.       Width           =   2895
  170.    End
  171.    Begin VB.TextBox txtListILYC 
  172.       Height          =   270
  173.       Left            =   1080
  174.       TabIndex        =   20
  175.       Top             =   3720
  176.       Width           =   6735
  177.    End
  178.    Begin VB.TextBox txtListICOP 
  179.       Height          =   270
  180.       Left            =   1080
  181.       TabIndex        =   19
  182.       Top             =   2280
  183.       Width           =   6735
  184.    End
  185.    Begin VB.TextBox txtListICMT 
  186.       Height          =   270
  187.       Left            =   1080
  188.       TabIndex        =   18
  189.       Top             =   1560
  190.       Width           =   6735
  191.    End
  192.    Begin VB.TextBox txtListIPRD 
  193.       Height          =   270
  194.       Left            =   1080
  195.       TabIndex        =   17
  196.       Top             =   1200
  197.       Width           =   6735
  198.    End
  199.    Begin VB.TextBox txtListIART 
  200.       Height          =   270
  201.       Left            =   1080
  202.       TabIndex        =   16
  203.       Top             =   840
  204.       Width           =   6735
  205.    End
  206.    Begin VB.TextBox txtListINAM 
  207.       Height          =   270
  208.       Left            =   1080
  209.       TabIndex        =   15
  210.       Top             =   480
  211.       Width           =   6735
  212.    End
  213.    Begin VB.Label Label4 
  214.       Alignment       =   1  '
  215.       BackStyle       =   0  '
  216.       Caption         =   "
  217.       Height          =   255
  218.       Left            =   120
  219.       TabIndex        =   43
  220.       Top             =   4440
  221.       Width           =   855
  222.    End
  223.    Begin VB.Label Label3 
  224.       Alignment       =   1  '
  225.       BackStyle       =   0  '
  226.       Caption         =   "
  227.       Height          =   255
  228.       Left            =   120
  229.       TabIndex        =   41
  230.       Top             =   4080
  231.       Width           =   855
  232.    End
  233.    Begin VB.Label Label2 
  234.       Alignment       =   1  '
  235.       BackStyle       =   0  '
  236.       Caption         =   "
  237.       Height          =   255
  238.       Left            =   120
  239.       TabIndex        =   39
  240.       Top             =   3720
  241.       Width           =   855
  242.    End
  243.    Begin VB.Label Label1 
  244.       Alignment       =   1  '
  245.       BackStyle       =   0  '
  246.       Caption         =   "
  247.       Height          =   255
  248.       Left            =   120
  249.       TabIndex        =   36
  250.       Top             =   120
  251.       Width           =   855
  252.    End
  253.    Begin VB.Label Label29 
  254.       Alignment       =   1  '
  255.       BackStyle       =   0  '
  256.       Caption         =   "
  257.       Height          =   255
  258.       Left            =   120
  259.       TabIndex        =   14
  260.       Top             =   480
  261.       Width           =   855
  262.    End
  263.    Begin VB.Label Label30 
  264.       Alignment       =   1  '
  265.       BackStyle       =   0  '
  266.       Caption         =   "
  267.       Height          =   255
  268.       Left            =   120
  269.       TabIndex        =   13
  270.       Top             =   840
  271.       Width           =   855
  272.    End
  273.    Begin VB.Label Label31 
  274.       Alignment       =   1  '
  275.       BackStyle       =   0  '
  276.       Caption         =   "
  277.       Height          =   255
  278.       Left            =   120
  279.       TabIndex        =   12
  280.       Top             =   1200
  281.       Width           =   855
  282.    End
  283.    Begin VB.Label Label32 
  284.       Alignment       =   1  '
  285.       BackStyle       =   0  '
  286.       Caption         =   "
  287.       Height          =   255
  288.       Left            =   120
  289.       TabIndex        =   11
  290.       Top             =   1560
  291.       Width           =   855
  292.    End
  293.    Begin VB.Label Label33 
  294.       Alignment       =   1  '
  295.       BackStyle       =   0  '
  296.       Caption         =   "
  297.       Height          =   255
  298.       Left            =   120
  299.       TabIndex        =   10
  300.       Top             =   1920
  301.       Width           =   855
  302.    End
  303.    Begin VB.Label Label34 
  304.       Alignment       =   1  '
  305.       BackStyle       =   0  '
  306.       Caption         =   "
  307.       Height          =   255
  308.       Left            =   3960
  309.       TabIndex        =   9
  310.       Top             =   1920
  311.       Width           =   855
  312.    End
  313.    Begin VB.Label Label40 
  314.       Alignment       =   1  '
  315.       BackStyle       =   0  '
  316.       Caption         =   "
  317.       Height          =   255
  318.       Left            =   120
  319.       TabIndex        =   8
  320.       Top             =   2640
  321.       Width           =   855
  322.    End
  323.    Begin VB.Label Label41 
  324.       Alignment       =   1  '
  325.       BackStyle       =   0  '
  326.       Caption         =   "
  327.       Height          =   255
  328.       Left            =   120
  329.       TabIndex        =   7
  330.       Top             =   3000
  331.       Width           =   855
  332.    End
  333.    Begin VB.Label Label44 
  334.       Alignment       =   1  '
  335.       BackStyle       =   0  '
  336.       Caption         =   "
  337.       Height          =   255
  338.       Left            =   120
  339.       TabIndex        =   6
  340.       Top             =   2280
  341.       Width           =   855
  342.    End
  343.    Begin VB.Label Label46 
  344.       Alignment       =   1  '
  345.       BackStyle       =   0  '
  346.       Caption         =   "
  347.       Height          =   255
  348.       Left            =   3960
  349.       TabIndex        =   5
  350.       Top             =   2640
  351.       Width           =   855
  352.    End
  353.    Begin VB.Label Label35 
  354.       Alignment       =   1  '
  355.       BackStyle       =   0  '
  356.       Caption         =   "
  357.       Height          =   255
  358.       Left            =   3960
  359.       TabIndex        =   4
  360.       Top             =   3000
  361.       Width           =   855
  362.    End
  363.    Begin VB.Label Label42 
  364.       Alignment       =   1  '
  365.       BackStyle       =   0  '
  366.       Caption         =   "
  367.       Height          =   255
  368.       Left            =   120
  369.       TabIndex        =   3
  370.       Top             =   3360
  371.       Width           =   855
  372.    End
  373.    Begin VB.Label Label47 
  374.       Alignment       =   1  '
  375.       BackStyle       =   0  '
  376.       Caption         =   "
  377.       Height          =   255
  378.       Left            =   3960
  379.       TabIndex        =   2
  380.       Top             =   3360
  381.       Width           =   855
  382.    End
  383.    Begin VB.Label Label36 
  384.       Alignment       =   1  '
  385.       BackStyle       =   0  '
  386.       Caption         =   "MP3
  387.       Height          =   255
  388.       Left            =   120
  389.       TabIndex        =   1
  390.       Top             =   4800
  391.       Width           =   855
  392.    End
  393. Attribute VB_Name = "frmSiInput"
  394. Attribute VB_GlobalNameSpace = False
  395. Attribute VB_Creatable = False
  396. Attribute VB_PredeclaredId = True
  397. Attribute VB_Exposed = False
  398. Dim fType As Long
  399. Private Sub btOpen_Click()
  400.     Dim ListData As LIST_INFO_EX_VB
  401.     Dim listString As String
  402.     cmdChgRmp.Enabled = False
  403.     cmdChgWav.Enabled = False
  404.     cmdChgMp3.Enabled = False
  405.     cmdCutMacBin.Enabled = False
  406.     cmdCutID3v2.Enabled = False
  407.     cmdReg.Enabled = False
  408.     If Dir(txtFile.Text) = "" Then Exit Sub
  409.     fType = vbmp3_getFileType(Trim(txtFile.Text))
  410.     If fType = -1 Then
  411.         Exit Sub
  412.     ElseIf (fType And FT_MAC) = FT_MAC Then
  413.         cmdCutMacBin.Enabled = True
  414.         Exit Sub
  415.     ElseIf (fType And FT_ID3V2) = FT_ID3V2 Then
  416.         cmdCutID3v2.Enabled = True
  417.         If (fType And FT_WAVE) <> FT_WAVE And (fType And FT_RMP) <> FT_RMP Then
  418.             cmdChgRmp.Enabled = True
  419.             cmdChgWav.Enabled = True
  420.         Else
  421.             cmdChgMp3.Enabled = True
  422.         End If
  423.     ElseIf (fType And FT_WAVE) <> FT_WAVE And (fType And FT_RMP) <> FT_RMP Then
  424.         cmdChgRmp.Enabled = True
  425.         cmdChgWav.Enabled = True
  426.     Else
  427.         cmdChgMp3.Enabled = True
  428.         cmdReg.Enabled = True
  429.     End If
  430.     'If vbmp3_getFileInfo2(Trim(txtFile.Text), TagData, MpegData, ListData) = False Then Exit Sub
  431.     If vbmp3_getListInfoExVB(Trim(txtFile.Text), ListData) = False Then Exit Sub
  432.     txtListINAM.Text = NTrim(ListData.INAM)
  433.     txtListIART.Text = NTrim(ListData.IART)
  434.     txtListIPRD.Text = NTrim(ListData.IPRD)
  435.     txtListICMT.Text = NTrim(ListData.ICMT)
  436.     txtListICRD.Text = NTrim(ListData.ICRD)
  437.     txtListIGNR.Text = NTrim(ListData.IGNR)
  438.     txtListICOP.Text = NTrim(ListData.ICOP)
  439.     txtListIENG.Text = NTrim(ListData.IENG)
  440.     txtListISRC.Text = NTrim(ListData.ISRC)
  441.     txtListISFT.Text = NTrim(ListData.ISFT)
  442.     txtListIKEY.Text = NTrim(ListData.IKEY)
  443.     txtListITCH.Text = NTrim(ListData.ITCH)
  444.     txtListICMS.Text = NTrim(ListData.ICMS)
  445.     txtListIMED.Text = NTrim(ListData.IMED)
  446.     txtListISBJ.Text = NTrim(ListData.ISBJ)
  447.     txtListIMP3.Text = NTrim(ListData.IMP3)
  448.     txtListILYC.Text = NTrim(ListData.ILYC)
  449. End Sub
  450. Private Sub cmdCancel_Click()
  451.     Unload Me
  452. End Sub
  453. Private Sub cmdChgMp3_Click()
  454.     If Dir(txtFile.Text) = "" Then Exit Sub
  455.     If MsgBox("
  456. H", vbYesNo + vbQuestion, "
  457. F") = vbYes Then
  458.         If chkChgExp.Value = 1 Then
  459.             iFile = left(Trim(txtFile.Text), Len(Trim(txtFile.Text)) - 4)
  460.             iFile = iFile + ".mp3"
  461.         Else
  462.             iFile = Trim(txtFile.Text)
  463.         End If
  464.         If Dir(iFile) <> "" Then
  465.             If MsgBox("
  466. H", vbYesNo + vbQuestion, "
  467. F") = vbNo Then Exit Sub
  468.             Kill iFile
  469.         End If
  470.         FileCopy Trim(txtFile.Text), iFile
  471.         
  472.         Call vbmp3_changeMp3(iFile)
  473.         txtFile.Text = iFile
  474.         Call btOpen_Click
  475.     End If
  476. End Sub
  477. Private Sub cmdChgRmp_Click()
  478.     Dim iFile As String
  479.     If Dir(txtFile.Text) = "" Then Exit Sub
  480.     If MsgBox("
  481.  RIFF MP3(RMP)
  482. H", vbYesNo + vbQuestion, "
  483. F") = vbYes Then
  484.         If chkChgExp.Value = 1 Then
  485.             iFile = left(Trim(txtFile.Text), Len(Trim(txtFile.Text)) - 4)
  486.             iFile = iFile + ".rmp"
  487.         Else
  488.             iFile = Trim(txtFile.Text)
  489.         End If
  490.         If Dir(iFile) <> "" Then
  491.             If MsgBox("
  492. H", vbYesNo + vbQuestion, "
  493. F") = vbNo Then Exit Sub
  494.             Kill iFile
  495.         End If
  496.         FileCopy Trim(txtFile.Text), iFile
  497.         Call vbmp3_changeRmp(iFile)
  498.         txtFile.Text = iFile
  499.         Call btOpen_Click
  500.     End If
  501. End Sub
  502. Private Sub cmdChgWav_Click()
  503.     If Dir(txtFile.Text) = "" Then Exit Sub
  504.     If MsgBox("
  505.  RIFF WAVE
  506. H", vbYesNo + vbQuestion, "
  507. F") = vbYes Then
  508.         If chkChgExp.Value = 1 Then
  509.             iFile = left(Trim(txtFile.Text), Len(Trim(txtFile.Text)) - 4)
  510.             iFile = iFile + ".wav"
  511.         Else
  512.             iFile = Trim(txtFile.Text)
  513.         End If
  514.         If Dir(iFile) <> "" Then
  515.             If MsgBox("
  516. H", vbYesNo + vbQuestion, "
  517. F") = vbNo Then Exit Sub
  518.             Kill iFile
  519.         End If
  520.         FileCopy Trim(txtFile.Text), iFile
  521.         
  522.         Call vbmp3_changeWav(iFile)
  523.         txtFile.Text = iFile
  524.         Call btOpen_Click
  525.     End If
  526. End Sub
  527. Private Sub cmdCutID3v2_Click()
  528.     If Dir(txtFile.Text) = "" Then Exit Sub
  529.     If MsgBox("ID3Tag v2
  530. H", vbYesNo + vbQuestion, "
  531. F") = vbYes Then
  532.         Call vbmp3_cutID3v2(Trim(txtFile.Text))
  533.         Call btOpen_Click
  534.     End If
  535. End Sub
  536. Private Sub cmdCutMacBin_Click()
  537.     If Dir(txtFile.Text) = "" Then Exit Sub
  538.     If MsgBox("Mac
  539. H", vbYesNo + vbQuestion, "
  540. F") = vbYes Then
  541.         Call vbmp3_cutMacBinary(Trim(txtFile.Text))
  542.         Call btOpen_Click
  543.     End If
  544. End Sub
  545. Private Sub cmdReg_Click()
  546.     'Dim ListData As LIST_INFO_EX_VB
  547.     Dim ListData As LIST_INFO_EX2
  548.     If Dir(txtFile.Text) = "" Then Exit Sub
  549.     ListData.INAM = txtListINAM.Text
  550.     ListData.IART = txtListIART.Text
  551.     ListData.IPRD = txtListIPRD.Text
  552.     ListData.ICMT = txtListICMT.Text
  553.     ListData.ICRD = txtListICRD.Text
  554.     ListData.IGNR = txtListIGNR.Text
  555.     ListData.ICOP = txtListICOP.Text
  556.     ListData.IENG = txtListIENG.Text
  557.     ListData.ISRC = txtListISRC.Text
  558.     ListData.ISFT = txtListISFT.Text
  559.     ListData.IKEY = txtListIKEY.Text
  560.     ListData.ITCH = txtListITCH.Text
  561.     ListData.ICMS = txtListICMS.Text
  562.     ListData.IMED = txtListIMED.Text
  563.     ListData.ISBJ = txtListISBJ.Text
  564.     ListData.IMP3 = txtListIMP3.Text
  565.     ListData.ILYC = txtListILYC.Text
  566.     'Call vbmp3_setListInfo(Trim(txtFile.Text), ListData)
  567.     'Call vbmp3_setListInfoExVB(Trim(txtFile.Text), ListData)
  568.     Call vbmp3_setListInfoEX2(Trim(txtFile.Text), ListData)
  569.     Unload Me
  570. End Sub
  571. Private Sub Form_Load()
  572.     cmdChgRmp.Enabled = False
  573.     cmdChgWav.Enabled = False
  574.     cmdChgMp3.Enabled = False
  575.     cmdCutMacBin.Enabled = False
  576.     cmdCutID3v2.Enabled = False
  577.     cmdReg.Enabled = False
  578. End Sub
  579.