VERSION 5.00 Begin VB.Form frmEdArray BorderStyle = 3 'Fixed Dialog ClientHeight = 3120 ClientLeft = 45 ClientTop = 330 ClientWidth = 3690 Icon = "EdArray.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3120 ScaleWidth = 3690 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin VB.CommandButton cmdCancelar Cancel = -1 'True Caption = "&Cancelar" Height = 375 Left = 2640 TabIndex = 6 Top = 2640 Width = 975 End Begin VB.CommandButton cmdAceptar Caption = "Ace&ptar" Height = 375 Left = 2640 TabIndex = 5 Top = 2160 Width = 975 End Begin VB.CommandButton cmdBorrar Caption = "&Borrar" Height = 375 Left = 2640 TabIndex = 4 Top = 1080 Width = 975 End Begin VB.CommandButton cmdModif Caption = "&Modificar" Height = 375 Left = 2640 TabIndex = 3 Top = 600 Width = 975 End Begin VB.CommandButton cmdNuevo Caption = "&Aņadir" Height = 375 Left = 2640 TabIndex = 2 Top = 120 Width = 975 End Begin VB.TextBox txtArray Height = 285 Left = 120 TabIndex = 0 Top = 2760 Width = 2415 End Begin VB.ListBox lstArray Height = 2595 Left = 120 TabIndex = 1 Top = 120 Width = 2415 End End Attribute VB_Name = "frmEdArray" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Public sArray As String Private sArray0 As String Private Sub cmdAceptar_Click() Dim i As Long sArray = "" If lstArray.ListCount > 0 Then For i = 0 To lstArray.ListCount - 1 sArray = sArray & lstArray.List(i) & Chr(SEPAR_ARRAY) Next End If Me.Hide End Sub Private Sub cmdBorrar_Click() If lstArray.ListIndex <> -1 Then lstArray.RemoveItem lstArray.ListIndex End If txtArray.Text = "" txtArray.SetFocus End Sub Private Sub cmdCancelar_Click() sArray = sArray0 Me.Hide End Sub Private Sub cmdModif_Click() If lstArray.ListIndex <> -1 Then lstArray.List(lstArray.ListIndex) = txtArray.Text End If txtArray.SetFocus End Sub Private Sub cmdNuevo_Click() Dim s As String s = txtArray.Text If s <> "" Then lstArray.AddItem s End If txtArray.Text = "" txtArray.SetFocus End Sub Private Sub lstArray_Click() If lstArray.ListIndex <> -1 Then txtArray.Text = lstArray.Text End If txtArray.SetFocus txtArray.SelStart = Len(txtArray.Text) txtArray.SelLength = 0 End Sub Public Sub Inicializa(ByVal s As String) Dim i As Long sArray = s sArray0 = sArray lstArray.Clear For i = 1 To ArrayLen(s) lstArray.AddItem ArrayItem(s, i) Next End Sub