Date post: | 16-Aug-2015 |
Category: |
Documents |
Upload: | david-tapia |
View: | 46 times |
Download: | 0 times |
NOMBRE: Gabriela Calvache
MATERIA: Programación Básica
LICENCIADO: Milton Guamán
TEMA: Manual de usuario (Menú de Programas)
CURSO: 264
AULA: 24
El siguiente trabajo tiene la Finalidad de mostrar el funcionamiento de Visual Basic 6.0 para realizar un programa con subprogramas
Estos subprogramas serán los siguientes:
1. PANTALLA DE MENÚ2. PAR / IMPAR3. SUMA/ PROMEDIO4. NUMERO MAYOR5. RANGO NUMERO
3.- Ubicarse en cada Formulario, dar clic derecho / editor de menús / y procedemos a ubicar el nombre del formulario.
MENU DE PROGRAMAS
3.- Luego de haber creado todos los formularios y darles nombre a cada uno de ellos empezamos a programar en cada uno de ellos:
En la pantalla principal:
En el formulario 5:
PSEUDOCODIGO Private Sub Command1_Click() Dim i As Integer Dim n As Integer Dim num As Integer Dim cont1 As Integer Dim cont2 As Integer Dim cont3 As Integer Dim cont4 As Integer i = 1 n = 0 cont1 = 0 cont2 = 0 cont3 = 0 cont4 = 0 n = Val(Text1.Text)
While i <= n num = Val(InputBox("Ingrese número deseado:", "num")) If (num >= 15 And num <= 25) Then cont1 = cont1 + 1 ElseIf (num >= 26 And num <= 35) Then cont2 = cont2 + 1 ElseIf (num >= 36 And num <= 75) Then cont3 = cont3 + 1 Else cont4 = cont4 + 1 End If i = i + 1WendLabel7.Caption = cont1Label8.Caption = cont2Label9.Caption = cont3Label10.Caption = cont4 End Sub
Private Sub Command2_Click()Text1.Text = ""Text1.SetFocusLabel7.Caption = ""Label8.Caption = ""Label9.Caption = ""Label10.Caption = ""End Sub Private Sub Command3_Click() Form5.Hide End Sub Private Sub Image1_Click() End Sub