Exercício 1 ficha 2
Ambiente gráfico:Textboxs:
texbox de cima:
Private Sub Oper1_Change()
End Sub
textbox de baixo:
Private Sub Oper2_Change()
End Sub
Labels:
label onde está escrito "Resultado:":
Private Sub Label1_Click()
End Sub
label onde aparece o resultado:
Private Sub resultado_Click()
End Sub
Botões:
botão de somar:
Private Sub cmdmais_Click()
resultado.Caption = Val(Oper1.Text) + Val(Oper2.Text)
End Sub
botão de subtração:
Private Sub cmdmenos_Click()
resultado.Caption = Val(Oper1.Text) - (Oper2.Text)
End Sub
botão de multiplicar:
Private Sub cmdmultiplicar_Click()
resultado.Caption = Val(Oper1.Text) * Val(Oper2.Text)
End Sub
botão de divisão:
Private Sub cmddividir_Click()
resultado.Caption = Val(Oper1.Text) / Val(Oper2.Text)
End Sub
botão sair:
Private Sub cmdsair_Click()
End
End Sub


Sem comentários:
Enviar um comentário