1. Visual Basic - Curso completo teoria y practica
1. Visual Basic - Curso completo teoria y practica 1. Visual Basic - Curso completo teoria y practica
“(AluPaterno + ' ' + AluMaterno) As Apellidos, ” & _ “AluNombres As Nombres From Alumno” Set DbgrdTabla.DataSource = RsAlumno End Sub Private Sub MostrarCurso() Set RsCurso = New ADODB.Recordset RsCurso.ActiveConnection = Cn RsCurso.CursorType = adOpenStatic RsCurso.LockType = adLockReadOnly RsCurso.CursorLocation = adUseClient RsCurso.Open “Select CurCodigo As Código, ” & _ “CurNombre As Nombre, ” & _ “CurVacantes As Vacantes, ” & _ “CurProfe As Profesor From Curso” Set DbgrdTabla.DataSource = RsCurso End Sub Private Sub MostrarLaboratorio() Set RsLaboratorio = New ADODB.Recordset RsLaboratorio.ActiveConnection = Cn RsLaboratorio.CursorType = adOpenStatic RsLaboratorio.LockType = adLockReadOnly RsLaboratorio.CursorLocation = adUseClient RsLaboratorio.Open “Select LabCodigo As Código, ” & _ “LabHora As Horario, ” & _ “LabProfe As [Jefe de práctica] From Laboratorio” Set DbgrdTabla.DataSource = RsLaboratorio End Sub Private Sub CmdMostrar_Click() Select Case CboTabla.ListIndex Pág. 378
Case 0 Call MostrarAlumno Case 1 Call MostrarCurso Case 2 Call MostrarLaboratorio End Select End Sub Finalmente guarde y pruebe su documento ActiveX. El resultado debe ser similar a la figura que se muestra a continuación: Aplicación Nº 2 Al documento ActiveX desarrollado en el ejercicio anterior, añadirle un botón Acerca de, que presente la Pág. 379
- Page 327 and 328: TxtCurNombre.DataField = “CurNomb
- Page 329 and 330: Para el desarrollo de esta aplicaci
- Page 331 and 332: RsCurso.LockType = adLockReadOnly R
- Page 333 and 334: Para desarrollar nuestra aplicació
- Page 335 and 336: Form1 Label1 Label2 Label3 Label4 T
- Page 337 and 338: Private Sub CmdNuevo_Click() TxtCur
- Page 339 and 340: Command1 Command2 Command3 Command4
- Page 341 and 342: End Sub Private Sub CmdCerrar_Click
- Page 343 and 344: Command3 Command4 Caption &Eliminar
- Page 345 and 346: Aplicación Nº 4 Elaborar una apli
- Page 347 and 348: un Comando y denomínelo CmCurso. E
- Page 349 and 350: Etiqueta6 Font Arial (Negrita 10) N
- Page 351 and 352: A continuación sobre el diseñador
- Page 353 and 354: Form1 Frame1 Option1 Option2 Option
- Page 355 and 356: Private Sub CmdSalir_Click() Unload
- Page 357 and 358: La presente Guía de Laboratorio de
- Page 359 and 360: La ventana de código de la clase d
- Page 361 and 362: Dim A As Circulo Private Sub Form_L
- Page 363 and 364: Nombre FrmPruebaMiControl Caption P
- Page 365 and 366: En seguida, guarde y ejecute su apl
- Page 367 and 368: Luego, haga click sobre la opción
- Page 369 and 370: Ahora hemos llegado a la ventana en
- Page 371 and 372: Proyecto1 Nombre ActiveXNumBox User
- Page 373 and 374: ejemplo 5 de Setiembre de 1752. El
- Page 375 and 376: usuario: A continuación proceda a
- Page 377: Command1 Nombre BdgrdTabla Font Ari
- Page 381 and 382: ingrese en el cuadro de texto adjun
- Page 383 and 384: Objetivos capaz de: Luego de comple
- Page 385 and 386: Para crear la interfaz de la aplica
- Page 387 and 388: TxtTabla.Value = S Else TxtTabla.Va
- Page 389 and 390: Luego haga click en el botón Acept
- Page 391 and 392: Button2 Button3 Button4 Nombre CmdA
- Page 393 and 394: DeCursosLibres.rsCmCurso.MoveFirst
- Page 395 and 396: Seleccion1 Nombre SelProfe Id SelPr
- Page 397 and 398: GUÍA DE LABORATORIO Nº 12 Objetiv
- Page 399 and 400: Aplicación Nº 2 Desarrollar una a
- Page 401 and 402: De la siguiente pantalla Ud. podrá
- Page 403 and 404: Uno de los temas en los que Windows
- Page 405 and 406: De manera análoga a los demás cas
- Page 407 and 408: Continuar de manera similar con las
- Page 409 and 410: Al hacer click en el botón Guardar
- Page 411 and 412: En seguida se mostrará la siguient
- Page 413 and 414: En la ficha Position defina el tama
- Page 415 and 416: Para cambiar el color de la zona de
- Page 417 and 418: En seguida dar click en el botón V
- Page 419 and 420: A continuación se presentará una
- Page 421: pedirán información referente al
“(AluPaterno + ' ' + AluMaterno) As Apellidos, ” & _<br />
“AluNombres As Nombres From Alumno”<br />
Set DbgrdTabla.DataSource = RsAlumno<br />
End Sub<br />
Private Sub Mostrar<strong>Curso</strong>()<br />
Set Rs<strong>Curso</strong> = New ADODB.Recordset<br />
Rs<strong>Curso</strong>.ActiveConnection = Cn<br />
Rs<strong>Curso</strong>.<strong>Curso</strong>rType = adOpenStatic<br />
Rs<strong>Curso</strong>.LockType = adLockReadOnly<br />
Rs<strong>Curso</strong>.<strong>Curso</strong>rLocation = adUseClient<br />
Rs<strong>Curso</strong>.Open “Select CurCodigo As Código, ” & _<br />
“CurNombre As Nombre, ” & _<br />
“CurVacantes As Vacantes, ” & _<br />
“CurProfe As Profesor From <strong>Curso</strong>”<br />
Set DbgrdTabla.DataSource = Rs<strong>Curso</strong><br />
End Sub<br />
Private Sub MostrarLaboratorio()<br />
Set RsLaboratorio = New ADODB.Recordset<br />
RsLaboratorio.ActiveConnection = Cn<br />
RsLaboratorio.<strong>Curso</strong>rType = adOpenStatic<br />
RsLaboratorio.LockType = adLockReadOnly<br />
RsLaboratorio.<strong>Curso</strong>rLocation = adUseClient<br />
RsLaboratorio.Open “Select LabCodigo As Código, ” & _<br />
“LabHora As Horario, ” & _<br />
“LabProfe As [Jefe de práctica] From Laboratorio”<br />
Set DbgrdTabla.DataSource = RsLaboratorio<br />
End Sub<br />
Private Sub CmdMostrar_Click()<br />
Select Case CboTabla.ListIndex<br />
Pág. 378