vb.net - Stuck on Byte Conversion -


i'm trying virtual click , in order need give keybd_event() byte value in order tell do. have function takes in passed string ( it's letter a-z ) , converts byte. when run program error conversion type 'byte()' type 'byte' not valid

here function:

private function getbytevalue(byval letter string)     dim byt = system.text.encoding.unicode.getbytes(letter)     return byt end function 

i don't know why error occurring, , i'm not sure returning byte value, rather how many bytes letter converts to, , need byte bvk value?

encoding.getbytes() returns array of bytes, not single byte. error message telling you trying convert byte array byte.

you have iterate on elements in array , process each 1 through keybd_event().


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -