Professional Documents
Culture Documents
Colegio Nacional de Educación Profesional Técnica Del Estado de
Colegio Nacional de Educación Profesional Técnica Del Estado de
Colegio Nacional de Educación Profesional Técnica Del Estado de
Chihuahua
Practica#4
Interfaz y Pantallas
Grupo: 6101-I
Matricula: 080260779-6
Objetivo: concluir con el diseño del sistema
Material:
Acces
Visual Basic
Desarrollo:
2. Diseño de pantallas
3. Dimensiones de formularios
5. Títulos de formularios
Código
Registro
Public Class Registro
Dim dt As New DataTable
Dim cn As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Sis
tema\Sistema\Sistema.mdb")
Private Sub Registro_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If (x = 2) Then
Label1.Text = ("Welcome to the registration of a new
account")
Label2.Text = ("Name")
Label3.Text = ("Last name")
Label4.Text = ("Mother's maiden name")
Label5.Text = ("Address")
Label6.Text = ("Birth date")
Label7.Text = ("Account Name")
Label8.Text = ("Password")
Button1.Text = ("Register")
Else
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
cn.Open()
dt.Reset()
Dim GuardarDatos As String = "Insert Into
NuevosRegistros(Nombre,ApellidgoM,ApellidgoP,Domicilio,FechaNac,NombreCue
nta,Contraseña)" & " Values ('" & TextBox1.Text & "','" & TextBox2.Text &
"', '" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text &
"','" & TextBox6.Text & "','" & TextBox7.Text & "')"
Dim dataAdapter As New OleDb.OleDbDataAdapter(GuardarDatos, cn)
dataAdapter.Fill(dt)
If (x = 2) Then
MsgBox("The account was created correctly")
Else
MsgBox("La cuenta se creo correctamente")
End If
dataAdapter.Dispose()
cn.Close()
Me.Hide()
Conectar.Show()
End Sub
End Class
Conectar
Pantallas