0% found this document useful (0 votes)
0 views2 pages

Form

The document contains a Visual Basic code for a form that allows users to input strings up to 10 times or until they type 'fin', which are then concatenated and displayed. It also includes functionality to save a word, search for a word, retrieve a word by its position, and delete stored data using a separate class instance. The user is notified of the success or failure of these operations through message boxes.

Uploaded by

bahanen124
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

Form

The document contains a Visual Basic code for a form that allows users to input strings up to 10 times or until they type 'fin', which are then concatenated and displayed. It also includes functionality to save a word, search for a word, retrieve a word by its position, and delete stored data using a separate class instance. The user is notified of the success or failure of these operations through message boxes.

Uploaded by

bahanen124
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Public Class Form1

Private patata As New Class1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim cadena As String
Dim contador As Integer
Dim cadenallena As String = ""

For contador = 0 To 9
cadena = InputBox("Escribe cosas hasta llegar a 10 o poner fin")
If cadena = "fin" Then

Exit For

Else
cadenallena = cadenallena + cadena
End If
Next
MsgBox(cadenallena)

End Sub

Private Sub Guardar_Click(sender As Object, e As EventArgs) Handles


Guardar.Click
Dim palabra As String
palabra = TextBox1.Text
If patata.guardar(palabra) = -1 Then
MsgBox("No se pudo almacenar almacen lleno")
Else
MsgBox("Almacenado correctamente")
End If
End Sub

Private Sub Buscar_Click(sender As Object, e As EventArgs) Handles Buscar.Click


Dim palabra As String
palabra = TextBox2.Text
If patata.buscar1(palabra) = -1 Then
MsgBox("No esta")
Else
MsgBox("si esta")
End If
End Sub

Private Sub buscar2_Click(sender As Object, e As EventArgs) Handles


buscar2.Click
Dim posicion As Double
posicion = TextBox3.Text
MsgBox("Lo que hay en la posicion " & posicion & " es " &
patata.buscar2(posicion))
End Sub

Private Sub eliminar_Click(sender As Object, e As EventArgs) Handles


eliminar.Click
patata.eliminar()
MsgBox("se ha eliminado correctamente")
End Sub
0000000000000000000000000
Private Sub buscar2_Click(sender As Object, e As EventArgs) Handles buscar2.Click

MsgBox(patata.posicionlibre)
End Sub

End Class

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy