Cursos de Visual Basic - Curso Básico de Programación en Visual Basic




Comentarios... (16)

Alicia
27 de Septiembre del 2002
estrellaestrellaestrellaestrellaestrella
Hola Guillermo:
Sólo quiero comentar que eres una persona muy agradable, el manual de visual basic me ha servido bastante como guia. Soy estudiante de ingenieria en Sistemas Computacionales y no he tenido un buen maestro que me sepa explicar como usar el visual basic... De verdad que te felicito porque has sabido aclararme varias dudas que yo tenia.
Gracias..
Responder
RICHASRD ARCE
15 de Noviembre del 2002
estrellaestrellaestrellaestrellaestrella
Ha realizado una valoración positiva de este curso.
Responder
fidel
14 de Diciembre del 2002
estrellaestrellaestrellaestrellaestrella
tengo un problema con la programacion de ado me da el error 3251
en este formulario y anticipadamente te quiro dar la gracias por la ayuda que le das a todos los estudiantes que se estan iniciando en mundo visual

Public seguir As Integer
Option Explicit
Private tbase1 As ADODB.Connection
Private WithEvents ttcliente As ADODB.Recordset
Attribute ttcliente.VB_VarHelpID = -1


Private Sub cancelar_Click()
Form_Initialize
salir.SetFocus
End Sub

Private Sub eliminar_Click()
Dim ttcliente As Recordset
If MsgBox("Esta Seguro De Eliminar El Registro Actual", vbYesNo) = vbYes Then


With ttcliente


If (.EOF Or .BOF) Then
MsgBox ("No Hay Ningun Registro Activo")
Else
.Delete

.MoveFirst
cancelar_Click
End If
End With
Else
MsgBox ("Eliminacion Abortada")
End If

End Sub

Private Sub Form_Load()
Const spathbase As String = "C:\Mis documentos\visual basic\FGSYSTEM\base1.mdb"
Set tbase1 = New ADODB.Connection
Set ttcliente = New ADODB.Recordset
With tbase1
.ConnectionString = _
"provider=Microsoft.Jet.OLEDB.4.0;" & _
"data source=" & spathbase & ";"
.Open
End With

End Sub
Private Sub Form_Initialize()

txtcodigo.Text = ""
txtnombres.Text = ""
txtapellidos.Text = ""
txtcedula.Text = ""
txtcorreo.Text = ""
txtfecha.Text = ""
txtocupacion.Text = ""
Txttelefono.Text = ""
txtdireccion.Text = ""
Deshabilitar_txt
txtcodigo.Enabled = True
deshabilitar_botones
End Sub

Sub habilitar_txt()
txtcodigo.Enabled = True
txtnombres.Enabled = True
txtapellidos.Enabled = True
txtcedula.Enabled = True
txtcorreo.Enabled = True
txtfecha.Enabled = True
txtocupacion.Enabled = True
Txttelefono.Enabled = True
txtdireccion.Enabled = True
End Sub

Sub Deshabilitar_txt()
txtcodigo.Enabled = False
txtnombres.Enabled = False
txtapellidos.Enabled = False
txtcedula.Enabled = False
txtcorreo.Enabled = False
txtfecha.Enabled = False
txtocupacion.Enabled = False
Txttelefono.Enabled = False
txtdireccion.Enabled = False
End Sub


Sub mostrar()

txtcodigo.Text = ttcliente.Fields("codigo")
txtnombres.Text = ttcliente.Fields("nombres")
txtcedula.Text = ttcliente.Fields("cedula")
txtdireccion.Text = ttcliente.Fields("direccion")
txtocupacion.Text = ttcliente.Fields("ocupacion")
txtcorreo.Text = ttcliente.Fields("correo")
txtfecha.Text = ttcliente.Fields("fecha")
txtapellidos.Text = ttcliente.Fields("apellidos")
Txttelefono.Text = ttcliente.Fields("telefono")
End Sub

Public Sub añadir()
ttcliente.Fields("codigo") = txtcodigo.Text
ttcliente.Fields("nombres") = txtnombres.Text
ttcliente.Fields("cedula") = txtcedula.Text
ttcliente.Fields("direccion") = txtdireccion.Text
ttcliente.Fields("ocupacion") = txtocupacion.Text
ttcliente.Fields("correo") = txtcorreo.Text
ttcliente.Fields("fecha") = txtfecha.Text
ttcliente.Fields("apellidos") = txtapellidos.Text
ttcliente.Fields("telefono") = Txttelefono.Text
End Sub
Private Sub incluir_Click()
deshabilitar_botones
cancelar.Enabled = True
añadir
ttcliente.Update
ttcliente.MoveLast
MsgBox ("Registro Satisfactorio")
cancelar_Click

End Sub

Private Sub modificar_Click()

habilitar_txt
deshabilitar_botones
cancelar.Enabled = True
incluir.Enabled = False
txtcodigo.Enabled = False
modificar.Enabled = True
modificar.Caption = "Actualizar"

If seguir = 2 Then

modificar.Caption = "Modificar"
añadir
ttcliente.MoveFirst
ttcliente.Update

MsgBox ("Actualizacion Satisfactoria")
cancelar_Click
End If

seguir = seguir + 1

End Sub

Private Sub salir_Click()
Unload Me
End Sub
Public Sub deshabilitar_botones()
incluir.Enabled = False
modificar.Enabled = False
eliminar.Enabled = False
cancelar.Enabled = False

End Sub
Public Sub habilitar_botones()
incluir.Enabled = True
modificar.Enabled = True
eliminar.Enabled = True
cancelar.Enabled = True
End Sub
Private Sub txtcodigo_LostFocus()
Dim sbuscar As String
sbuscar = txtcodigo.Text
sbuscar = Replace(sbuscar, "*", "%")
sbuscar = Replace(sbuscar, "?", "_")
txtcodigo.Text = sbuscar

sbuscar = "select * from tcliente where codigo like '" & sbuscar & "' order by codigo"
Set ttcliente = tbase1.Execute(sbuscar)

With ttcliente
If (.BOF And .EOF) Then
If MsgBox(" El Cliente No 'EXISTE' ¿Desea Registrarlo? ", vbYesNo) = vbYes Then

.AddNew
habilitar_txt
txtcodigo.Enabled = False
habilitar_botones
modificar.Enabled = False
eliminar.Enabled = False


End If

Else
Do While Not .EOF
seguir = 1
Deshabilitar_txt
mostrar
habilitar_botones
incluir.Enabled = False

.MoveNext
Loop
End If
End With


End Sub

espero que me puedas ayudar a solventar este problema ya que me ha tenido bastante preocupado al no saber como resolverlo

gracias

espero que puedas responderme guille gracias
Responder
fidel
14 de Diciembre del 2002
estrellaestrellaestrellaestrellaestrella
tengo un problema con la programacion de ado me da el error 3251
en este formulario y anticipadamente te quiro dar la gracias por la ayuda que le das a todos los estudiantes que se estan iniciando en mundo visual

Public seguir As Integer
Option Explicit
Private tbase1 As ADODB.Connection
Private WithEvents ttcliente As ADODB.Recordset
Attribute ttcliente.VB_VarHelpID = -1

Private Sub cancelar_Click()
Form_Initialize
salir.SetFocus
End Sub

Private Sub eliminar_Click()
Dim ttcliente As Recordset
If MsgBox("Esta Seguro De Eliminar El Registro Actual", vbYesNo) = vbYes Then

With ttcliente

If (.EOF Or .BOF) Then
MsgBox ("No Hay Ningun Registro Activo")
Else
.Delete "aqui tambien"

.MoveFirst
cancelar_Click
End If
End With
Else
MsgBox ("Eliminacion Abortada")
End If

End Sub

Private Sub Form_Load()
Const spathbase As String = "C:\Mis documentos\visual basic\FGSYSTEM\base1.mdb"
Set tbase1 = New ADODB.Connection
Set ttcliente = New ADODB.Recordset
With tbase1
.ConnectionString = _
"provider=Microsoft.Jet.OLEDB.4.0;" & _
"data source=" & spathbase & ";"
.Open
End With

End Sub
Private Sub Form_Initialize()

txtcodigo.Text = ""
txtnombres.Text = ""
txtapellidos.Text = ""
txtcedula.Text = ""
txtcorreo.Text = ""
txtfecha.Text = ""
txtocupacion.Text = ""
Txttelefono.Text = ""
txtdireccion.Text = ""
Deshabilitar_txt
txtcodigo.Enabled = True
deshabilitar_botones
End Sub

Sub habilitar_txt()
txtcodigo.Enabled = True
txtnombres.Enabled = True
txtapellidos.Enabled = True
txtcedula.Enabled = True
txtcorreo.Enabled = True
txtfecha.Enabled = True
txtocupacion.Enabled = True
Txttelefono.Enabled = True
txtdireccion.Enabled = True
End Sub

Sub Deshabilitar_txt()
txtcodigo.Enabled = False
txtnombres.Enabled = False
txtapellidos.Enabled = False
txtcedula.Enabled = False
txtcorreo.Enabled = False
txtfecha.Enabled = False
txtocupacion.Enabled = False
Txttelefono.Enabled = False
txtdireccion.Enabled = False
End Sub

Sub mostrar()

txtcodigo.Text = ttcliente.Fields("codigo") "aqui me da el error"
txtnombres.Text = ttcliente.Fields("nombres")
txtcedula.Text = ttcliente.Fields("cedula")
txtdireccion.Text = ttcliente.Fields("direccion")
txtocupacion.Text = ttcliente.Fields("ocupacion")
txtcorreo.Text = ttcliente.Fields("correo")
txtfecha.Text = ttcliente.Fields("fecha")
txtapellidos.Text = ttcliente.Fields("apellidos")
Txttelefono.Text = ttcliente.Fields("telefono")
End Sub

Public Sub añadir()
ttcliente.Fields("codigo") = txtcodigo.Text "aqui ta,bien"
ttcliente.Fields("nombres") = txtnombres.Text
ttcliente.Fields("cedula") = txtcedula.Text
ttcliente.Fields("direccion") = txtdireccion.Text
ttcliente.Fields("ocupacion") = txtocupacion.Text
ttcliente.Fields("correo") = txtcorreo.Text
ttcliente.Fields("fecha") = txtfecha.Text
ttcliente.Fields("apellidos") = txtapellidos.Text
ttcliente.Fields("telefono") = Txttelefono.Text
End Sub
Private Sub incluir_Click()
deshabilitar_botones
cancelar.Enabled = True
añadir
ttcliente.Update "aqui tambien"
ttcliente.MoveLast
MsgBox ("Registro Satisfactorio")
cancelar_Click

End Sub

Private Sub modificar_Click()

habilitar_txt
deshabilitar_botones
cancelar.Enabled = True
incluir.Enabled = False
txtcodigo.Enabled = False
modificar.Enabled = True
modificar.Caption = "Actualizar"

If seguir = 2 Then

modificar.Caption = "Modificar"
añadir
ttcliente.MoveFirst
ttcliente.Update "aqui tambien"

MsgBox ("Actualizacion Satisfactoria")
cancelar_Click
End If

seguir = seguir + 1

End Sub

Private Sub salir_Click()
Unload Me
End Sub
Public Sub deshabilitar_botones()
incluir.Enabled = False
modificar.Enabled = False
eliminar.Enabled = False
cancelar.Enabled = False

End Sub
Public Sub habilitar_botones()
incluir.Enabled = True
modificar.Enabled = True
eliminar.Enabled = True
cancelar.Enabled = True
End Sub
Private Sub txtcodigo_LostFocus()
Dim sbuscar As String
sbuscar = txtcodigo.Text
sbuscar = Replace(sbuscar, "*", "%")
sbuscar = Replace(sbuscar, "?", "_")
txtcodigo.Text = sbuscar

sbuscar = "select * from tcliente where codigo like '" & sbuscar & "' order by codigo"
Set ttcliente = tbase1.Execute(sbuscar)

With ttcliente
If (.BOF And .EOF) Then
If MsgBox(" El Cliente No 'EXISTE' ¿Desea Registrarlo? ", vbYesNo) = vbYes Then

.AddNew
habilitar_txt
txtcodigo.Enabled = False
habilitar_botones
modificar.Enabled = False
eliminar.Enabled = False

End If

Else
Do While Not .EOF
seguir = 1
Deshabilitar_txt
mostrar
habilitar_botones
incluir.Enabled = False

.MoveNext
Loop
End If
End With

End Sub

espero que me puedas ayudar a solventar este problema ya que me ha tenido bastante preocupado al no saber como resolverlo

gracias

espero que puedas responderme guille gracias
Responder
David
25 de Diciembre del 2002
estrellaestrellaestrellaestrellaestrella
Excelente y MUY completo
Responder
alejandro
5 de Enero del 2003
estrellaestrellaestrellaestrellaestrella
desde luego es muy completo y facil de entender
Responder
Misterio
24 de Mayo del 2003
estrellaestrellaestrellaestrellaestrella
esta pesimo..no vale la pena el que lo escribio es un pobre mediocre...
Responder
angela
10 de Julio del 2003
estrellaestrellaestrellaestrellaestrella
hagan algo mejor
Responder
Mariano Porcile
24 de Julio del 2003
estrellaestrellaestrellaestrellaestrella
Lo estoy siguiendo y es un curso facil de leer y llevar. No te aburrís.
Responder
Gerardo Cornejo
28 de Octubre del 2003
estrellaestrellaestrellaestrellaestrella
Buen trabajo, me sirvió de harto...
Responder
Eduardo
16 de Abril del 2004
estrellaestrellaestrellaestrellaestrella
ME PODRIAN MANDAR CURSOS DE VISUAL BASIC
···NO LOS PUEDO BAJAR·····
POR FAVOR
Responder
dinorah liliana diaz padilla
15 de Mayo del 2004
estrellaestrellaestrellaestrellaestrella
muy bien pero tu sabes como hacer un proyecto a sistema con vbrun
Responder
MARK ANTONY
11 de Junio del 2004
estrellaestrellaestrellaestrellaestrella
nO PIERDAN TIEMPO LEYENDOLO, Y LOS QUE YA LO HICIERON NO SE SIENTAN FRUSTRADOS, LO QUE NO SIRVE ES ESTE TUTORIAL, PARA MI NO VALE UN CENTAVO.
Responder
Valadares Erico
12 de Julio del 2005
estrellaestrellaestrellaestrellaestrella
Guille, sos un gallego capo, la verdad, tu curso esta buenisimo. Yo soy amateur en la cosa, pero a veces a uno se le ocurre jugar un ratito con la compu e inventar cosas. Me ayudaste un monton, muchas gracias che! Si queres anda a visitar mi pagina en Internet, voy a poner un link ahi para tu pagina.
Salu2.
¡¡¡Erico!!!
Responder
Valadares Erico
12 de Julio del 2005
estrellaestrellaestrellaestrellaestrella
Guille, sos un gallego capo, la verdad, tu curso esta buenisimo. Yo soy amateur en la cosa, pero a veces a uno se le ocurre jugar un ratito con la compu e inventar cosas. Me ayudaste un monton, muchas gracias che! Si queres anda a visitar mi pagina en Internet, voy a poner un link ahi para tu pagina.
Salu2.
¡¡¡Erico!!!
Responder
Ramón
22 de Junio del 2007
estrellaestrellaestrellaestrellaestrella
Guille, bueno estos cursos son de años atrás. Hoy empecé con el primer capitulo y creeme que me sirvió y lo mejor es que estoy entendiendo.
Esto está ideal para una persona nueva en programación y sin experiencia
Gracias
Responder

Comentar

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/c1267