0% found this document useful (0 votes)
9 views3 pages

Directory Phone Book Application

This document contains code for a Visual Basic .NET application that allows users to create and view a telephone directory. The application creates a text file at a specified file path to store contact names and phone numbers. Users can add new contacts by entering a name and number, which are then written to the text file. Existing contact information can be viewed by reading from the text file and displaying it. The application also includes buttons to open and close the form, as well as mouse hover effects for a panel.

Uploaded by

Don Carlo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Directory Phone Book Application

This document contains code for a Visual Basic .NET application that allows users to create and view a telephone directory. The application creates a text file at a specified file path to store contact names and phone numbers. Users can add new contacts by entering a name and number, which are then written to the text file. Existing contact information can be viewed by reading from the text file and displaying it. The application also includes buttons to open and close the form, as well as mouse hover effects for a panel.

Uploaded by

Don Carlo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Public Class Form1 'antes de ejecutar en necesario cambiar el valor de la constante RutaParaGenerarArchivo por una ruta que sea

valida 'en el equipo que se va a ejecutar 'Esta es la ruta para generar el archivo Public ruta As String Public RutaParaGenerarArchivo As String = "C:\Users\Carlos\Desktop\directoriotelefonico2" Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim archivo As Object Dim intru As Object Dim caja As OpenFileDialog = New OpenFileDialog

intru = CreateObject("[Link]") archivo = [Link](RutaParaGenerarArchivo, False) [Link]() End Sub Private Sub Button1_Click(ByVal sender As Object, ByVal e As [Link]) Handles [Link] Dim nombre, numero As String nombre = [Link] numero = [Link] [Link] = "" [Link] = ""

nombre. Dim sw As New [Link](RutaParaGenerarArchivo, True) [Link](nombre & " -> " & numero) [Link]() MsgBox("Operacin exitosa!") End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim sr As New [Link](RutaParaGenerarArchivo) [Link] = [Link] [Link]() End Sub

Private Sub SalirToolStripMenuItem_Click(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link]() End Sub

Private Sub Panel1_MouseEnter(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub

Private Sub Panel1_MouseLeave(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub End Class

Imports [Link] Public Class Dialog1 Public Sub New() ' Llamada necesaria para el diseador. InitializeComponent() ' Agregue cualquier inicializacin despus de la llamada a InitializeComponent(). End Sub Private Sub Boton_Buscar_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] [Link]() End Sub Private Sub Boton_Abrir_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] [Link]() End Sub Private Sub Dialog1_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class

You might also like