13.07.2015 Views

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

End Sub'NOTA:'- El modulo agregado (modProcedures), sirve para hacer conversiones de numeros' entre diferentes sistemas.'- El modulo agregado (export), sirve para exportar el grid a un documento de exel.'- El modulo agregado (module1), sirve para ejecutar un proceso automatico despues de' un tiempo especificado.Formulario de desconexión13.2.3 Formulario de desconexión'Forma que se ejecuta cuando se ha desconectado la tarjeta de la pc'muestra en pantalla la forma de conexion, con la leyenda que cita'"Por favor conecte la tarjeta"'Rutina que se ejecuta cuando se cierra la forma, cuando se hace'clic en el boton cerrar XPrivate Sub Form_Unload(Cancel As Integer)frmRFID.HIDComm1.UninitfrmRFID.HIDComm1.DisconnectfrmRFID.Timer1.Enabled = FalseEndEnd SubMODULO PARA CONVERSION <strong>DE</strong> NUMEROS ENTRE SISTEMAS.(modProcedures.bas)'Modulo descargado desde la direccion'http://vbasic.astalaweb.com/C%C3%A1lculos%20II/Convierte%20de%20hexadecimal%20a%20decimal.asp'Adaptado por Luis Mario Mercado.Const HexA = 10Const HexB = 11Const HexC = 12Const HexD = 13Const HexE = 14Const HexF = 15Public Function ConvertHexToDecimal(ByVal HexValue As String) As VariantDim rValue, A As LongDim Temp, Rev As StringRev = StrReverse(HexValue)'Numbers are read from right to left, unlike text, which'are read from right to left; therefore, the string should'be reversed so it can be read like a normal string.For A = 1 To Len(HexValue)Temp = Mid$(Rev, A, 1)'This, along with the for-next loop allows you to'read all the characters in the screen 1 at a timeIf Val(Temp) = Temp Then'Character is a numberIf A = 1 Then'Character is a number, and is the first'character in the stringrValue = Val(Temp)'Because the character is the first of the'string, there is no value in rValue yet, so'you can just assign the valueElserValue = rValue + (Val(Temp) * (16 ^ (A - 1)))'So this adds to rValue.. it takes it's- 161 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!