how i can truncate a string for a max size
You can use Left to get the first X characters of a string, assuming left-to-right reading order:
Dim s As String = Left("Hello, world!", 5) ' get the first 5 characters
See also: Right, Mid
ok thanks