Visual Basic 6.0 Algunos Comandos
Enviado por arnold3dok • 24 de Mayo de 2015 • 3.048 Palabras (13 Páginas) • 294 Visitas
***Abrir Modulo para determinar las Variables para cualquier parte con GLOBAL
***Llamar a los otros formularios atreves de botones o pestañas, se coloca
(FRM ------ . Show 1)
***Para agregar las Pestañas arriba, uno debe colocarse en la planilla y apretar “click” derecho y abrir “Editor de Menus..”
Y todos los archivos que agregue tienen que ir con “mnu-------“
***Botones Volver = Unload Me
PARA QUE LOS VALORES QUEDEN GUARDADOS
Private Sub cmdActualizar_Click()
If (txtLocal.Text) <> Empty Then
If IsNumeric(txtLocal.Text) Then
ValorLocal = Val(txtLocal.Text)
Else
Call MsgBox("Debe Indicar un Numero", , "Llamada Local")
txtLocal.Text = Empty
txtLocal.SetFocus
End If
Else
Call MsgBox("Debe Indicar un Valor", , "Llamada Local")
txtLocal.Text = Empty
txtLocal.SetFocus
End If
If (txtInternacional.Text) <> Empty Then
If IsNumeric(txtInternacional.Text) Then
ValorInternacional = Val(txtInternacional.Text)
Else
Call MsgBox("Debe Indicar un Numero", , "Llamada Internacional")
txtInternacional.Text = Empty
txtInternacional.SetFocus
End If
Else
Call MsgBox("Debe Indicar un Valor", , "Llamada Internacional")
txtInternacional.Text = Empty
txtInternacional.SetFocus
End If
If (txtMensaje.Text) <> Empty Then
If IsNumeric(txtMensaje.Text) Then
ValorMensaje = Val(txtMensaje.Text)
Else
Call MsgBox("Debe Indicar un Numero", , "Mensaje")
txtMensaje.Text = Empty
txtMensaje.SetFocus
End If
Else
Call MsgBox("Debe Indicar un Valor", , "Mensaje")
txtMensaje.Text = Empty
txtMensaje.SetFocus
End If
End Sub
Private Sub Form_Load()
txtLocal.Text = ValorLocal
txtInternacional.Text = ValorInternacional
txtMensaje.Text = ValorMensaje
End Sub
Option Explicit
Dim MinutoLocal As Long
Dim MinutoInternacional As Long
Dim CantidadMensaje As Long
Dim Total As Long
Private Sub cmdCalcular_Click()
If (txtLocal.Text) <> Empty Then
If IsNumeric(txtLocal.Text) Then
MinutoLocal = Val(txtLocal.Text)
If (txtInternacional.Text) <> Empty Then
If IsNumeric(txtInternacional.Text) Then
MinutoInternacional = Val(txtInternacional.Text)
If (txtMensaje.Text) <> Empty Then
If IsNumeric(txtMensaje.Text) Then
CantidadMensaje = Val(txtMensaje.Text)
'-------------------------
Calcular
'-------------------------
Else
Call MsgBox("Debe Indicar un Numero", , "Minuto Local")
txtLocal.Text = Empty
txtLocal.SetFocus
End If
Else
Call MsgBox("Debe Indicar un Valor", , "Minuto Local")
txtLocal.Text = Empty
txtLocal.SetFocus
End If
Else
Call MsgBox("Debe Indicar un Numero", , "Minuto Internacional")
txtInternacional.Text = Empty
txtInternacional.SetFocus
End If
Else
...