Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to use open for binary to read long plastic data saved by vb?
How to use open for binary to read long plastic data saved by vb?
This code reads the contents of the binary file and outputs it to the Text 1 control.

However, there is an error in this code: when assigning binary array b to Text 1 Text, there will be a type mismatch error. Binary arrays can't be directly converted into strings, so they need to be converted by special functions.

For example, you can use the following code:

vbnetCopy codeText 1。 Text = System. text . encoding . ascii . getstring(b)

This code uses ASCII encoding to convert binary array B into a string, and then assigns it to Text 1.Text.