index.php?id=112
Por Yal Publicidad
Publicado el Mie 3 de Marzo del 2021 a las 15:49
En este ejemplo veremos como crear un simple generador de series para programas en Visual Basic 6.0
Option Explicit
Private Function getSerial(Cadena As String) As String
Dim StrLen As Integer
Dim I As Integer
Dim strHex As String
Cadena = Trim(Cadena)
StrLen = Len(Cadena)
For I = 1 To StrLen
strHex = strHex & Hex(Val(Asc(Mid(Cadena, I, 1))) * StrLen)
Next
getSerial = Mid(strHex, 1, 4) & "-" & Mid(strHex, 5, 4) & "-" & Mid(strHex, 9, 4) & "-" & Mid(strHex, 13, 4)
End Function
Private Sub Command1_Click()
MsgBox getSerial(Text1)
End Sub
Yal Publicidad
Yuri Lizama