Tareas

Páginas: 3 (581 palabras) Publicado: 31 de octubre de 2010
APLICACIONES DE PROGRAMACION

EJEMPLO1: ACTIVIDAD Realizar módulos o submodulos que sean necesarios utilizando la siguiente interfaz.

PRIMERO Realizar el siguiente código dentro del botónCALCULAR Private Sub Command1_Click() If (Text1 " ") And (Text2 " ") Then Text3 = Val(Text1) + Val(Text2) Else MsgBox "Error, dejó un valor en blanco", vbCritical, "Error" Text1.SetFocus End If End SubSEGUNDO Realizar el código del Botón OTRO Private Sub Command2_Click() Text1 = " " Text2 = " " Text3 = " " Text1.SetFocus
1 L.I. DARINEL ANTONIO LIBRADO CEUNICO CAMPUS - ACAYUCAN

APLICACIONES DEPROGRAMACION

End Sub TERCERO Realizar el código del botón TERMINAR Private Sub Command3_Click() Dim opcion$ opcion$ = MsgBox("¿Desea salir?", vbQuestion + vbYesNo, "Salir de Mi Aplicación") If(opcion$ = vbYes) Then End Else Cancel = -1 End If End Sub

2

L.I. DARINEL ANTONIO LIBRADO

CEUNICO CAMPUS - ACAYUCAN

APLICACIONES DE PROGRAMACION

EJEMPLO2 ACTIVIDAD Es criba las funcionesy los submodulos necesarios para la siguiente interfaz.

Function existe() As Boolean ¨ If (Text1 " ") And (Text2 " ") Then existe = True Else existe = False End If End Function Function sum(A, BAs Integer) As Integer sum = A + B End Function

3

L.I. DARINEL ANTONIO LIBRADO

CEUNICO CAMPUS - ACAYUCAN

APLICACIONES DE PROGRAMACION

Private Sub Command1_Click() Dim opcion$ opcion$ =MsgBox("Esta seguro que se dea salir...", vbQuestion + vbYesNo, "Salir") If (opcion$ = vbYes) Then End Else Cancel = -1 End If

End Sub Private Sub Command2_Click() Text1 = " " Text2 = " " Text3 =" " Text1.SetFocus End Sub Private Sub Command3_Click() If existe Then Text3 = sum(Val(Text1), Val(Text2)) Else MsgBox "Error, Introduzca datos..", vbCritical, "Error" Text1.SetFocus End If End SubFunction rest(A, B As Integer) As Integer rest = A - B End Function Private Sub Command4_Click() If existe Then Text3 = rest(Val(Text1), Val(Text2)) Else MsgBox "Errror,introduzca datos", vbCritical,...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Tareas tareas y mas tareas
  • tareas tareas
  • Taran Taran
  • tareas tareas
  • Tareas Y Tareas
  • Mis tareas...Tus tareas
  • Tareas de Tareas
  • Tareas

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS