Convierte código Hexadecimal a número Win32Hex
Código (vbnet) [Seleccionar]
#Region " Hex To Win32Hex "
' [ Hex To Win32Hex Function ]
'
' // By Elektro H@cker
'
' Examples:
' MsgBox(Hex_To_Win32Hex("FF4")) ' Result: &HFF4
' MsgBox(Hex_To_Win32Hex("0xFF4")) ' Result: &HFF4
' Dim Number As Int32 = Hex_To_Win32Hex("0xFF4") ' Result: 4084
Private Function Hex_To_Win32Hex(ByVal Hex As String) As String
If Hex.ToLower.StartsWith("0x") Then Hex = Hex.Substring(2, Hex.Length - 2)
Return "&H" & Hex
End Function
#End Region