home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jpi / musdefed.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-12-05  |  2.8 KB  |  101 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Music Definition Editor"
  5.    ClientHeight    =   1890
  6.    ClientLeft      =   5175
  7.    ClientTop       =   1755
  8.    ClientWidth     =   4455
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   1890
  13.    ScaleWidth      =   4455
  14.    Begin VB.TextBox Text2 
  15.       Height          =   285
  16.       Left            =   2760
  17.       TabIndex        =   2
  18.       Top             =   840
  19.       Width           =   1575
  20.    End
  21.    Begin VB.TextBox Text1 
  22.       Height          =   285
  23.       Left            =   2760
  24.       TabIndex        =   1
  25.       Top             =   240
  26.       Width           =   1575
  27.    End
  28.    Begin VB.ListBox List1 
  29.       Height          =   1620
  30.       Left            =   120
  31.       TabIndex        =   0
  32.       Top             =   120
  33.       Width           =   2535
  34.    End
  35.    Begin VB.Label Label2 
  36.       Caption         =   "Filename"
  37.       Height          =   255
  38.       Left            =   2760
  39.       TabIndex        =   4
  40.       Top             =   600
  41.       Width           =   1575
  42.    End
  43.    Begin VB.Label Label1 
  44.       Caption         =   "Name"
  45.       Height          =   255
  46.       Left            =   2760
  47.       TabIndex        =   3
  48.       Top             =   0
  49.       Width           =   1575
  50.    End
  51. Attribute VB_Name = "Form1"
  52. Attribute VB_GlobalNameSpace = False
  53. Attribute VB_Creatable = False
  54. Attribute VB_PredeclaredId = True
  55. Attribute VB_Exposed = False
  56. Private Sub Form_Load()
  57. On Error Resume Next
  58. Call Load
  59. Call UpdateList
  60. List1.ListIndex = 0
  61. End Sub
  62. Private Sub Form_Unload(Cancel As Integer)
  63. Call Save
  64. End Sub
  65. Private Sub List1_Click()
  66. Call UpdateProperties
  67. End Sub
  68. Private Sub List1_KeyUp(KeyCode As Integer, Shift As Integer)
  69. If KeyCode = 46 Then
  70.   MaxMusicFiles = MaxMusicFiles - 1
  71.   For i = List1.ListIndex To MaxMusicFiles + 1
  72.     Musicfiles(i).filename = Musicfiles(i + 1).filename
  73.     Musicfiles(i).tracktitle = Musicfiles(i + 1).tracktitle
  74.   Next i
  75.   List1.ListIndex = List1.ListIndex - 1
  76.   Call UpdateList
  77.   Call UpdateProperties
  78. End If
  79. End Sub
  80. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  81. mnum = List1.ListIndex
  82. If mnum > 0 Then
  83.   Musicfiles(mnum).tracktitle = Text1.Text
  84.   Call UpdateList
  85.   MaxMusicFiles = MaxMusicFiles + 1
  86.   currtext = Text1.Text
  87.   Call UpdateList
  88.   List1.ListIndex = MaxMusicFiles
  89.   Call UpdateList
  90.   Text1.Text = currtext
  91.   Text1.SelStart = Len(Text1.Text)
  92.   Musicfiles(mnum).tracktitle = Text1.Text
  93. End If
  94. End Sub
  95. Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
  96. mnum = List1.ListIndex
  97. If mnum > 0 Then
  98.   Musicfiles(mnum).filename = Text2.Text
  99. End If
  100. End Sub
  101.