开发者

How I can covert this hexadecimal values to pixel values

开发者 https://www.devze.com 2023-02-10 19:24 出处:网络
While I\'m reading data from an HID device for X and Y axis values, getting the X & Y axis data in Hexadecimal value. How I can covert this hexadecimal values to pixel v开发者_开发技巧alues.Do you

While I'm reading data from an HID device for X and Y axis values, getting the X & Y axis data in Hexadecimal value. How I can covert this hexadecimal values to pixel v开发者_开发技巧alues.


Do you mean a hex string? like '5A'.
if so ive found sucess with this

function HexToInt(HexNum: string): LongInt;
begin
   Result:=StrToInt('$' + HexNum) ;
end;
0

精彩评论

暂无评论...
验证码 换一张
取 消