Circuitos

Solo disponible en BuenasTareas
  • Páginas : 3 (709 palabras )
  • Descarga(s) : 0
  • Publicado : 29 de marzo de 2011
Leer documento completo
Vista previa del texto
frmConfigurar - 1 Private Sub bCerrar_Click() Unload Me End Sub Private Sub bGuardar_Click() On Error Resume Next If txtC = "" Then frmTermometro.celsius = txtF.Text frmTermometro.celsius = 5 *(frmTermometro.celsius - 32) / 9 frmTermometro.comm = txtComm.Text Else frmTermometro.celsius = Val(txtC.Text) frmTermometro.comm = txtComm.Text End If''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If Err.Number Then Err.Clear frmTermometro.celsius = Replace(frmTermometro.celsius, ",", ".") End If Unload Me End Sub Private Sub Form_Load() bCerrar.MousePointer =vbCustom bGuardar.MousePointer = vbCustom Set bGuardar.MouseIcon = LoadPicture(App.Path & "\mano.ico") Set bCerrar.MouseIcon = LoadPicture(App.Path & "\mano.ico")'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' txtC.Text = Format(frmTermometro.celsius, "0.00") txtComm.Text = frmTermometro.comm End Sub Private Sub txtC_Change() txtF.Text = "" End Sub Private SubtxtC_Click() txtF.Text = "" End Sub Private Sub txtC_KeyPress(KeyAscii As Integer) cadena = "0123456789" + Chr(8) 'chr(8) = delete, es decir admitimos borrar If InStr(cadena, Chr(KeyAscii)) = 0 Then KeyAscii= 0 End If End Sub Private Sub txtComm_KeyPress(KeyAscii As Integer) cadena = "0123456789" + Chr(8) 'chr(8) = delete, es decir admitimos borrar If InStr(cadena, Chr(KeyAscii)) = 0 Then KeyAscii = 0End If End Sub Private Sub txtF_Change() txtC.Text = "" End Sub Private Sub txtF_Click() txtC.Text = "" End Sub Private Sub txtF_KeyPress(KeyAscii As Integer) cadena = "0123456789" + Chr(8) 'chr(8) =delete, es decir admitimos borrar If InStr(cadena, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End Sub

frmTermometro - 1 Public celsius As Variant, comm As Variant Dim pic, cadena As String PrivateSub Calcular() Min = 0 'Valor mínimo enviado por el PIC Max = 256 'Valor máximo enviado por el PIC Li = 0 'Valor mínimo leido por el usuario en grados celsius Ls = 150 'Valor máximo leido por el...
tracking img