How To Make Unicode String Reader In VB.NET

How To Make Unicode String Reader In VB.NET
hey guys , today i was searching for some old things and i found out a simple program i wrote before two years and it's a unicode string reader , it has a simple interface i have used a richtextbox and a button and of course a openfiledialog in code . when you click the button the openfiledialog dialog comes up and you just go ahead and select any file and click ok and you have the unicode string of the file in the richtextbox by the way you will laugh this program has three lines of codes :D , ok now go create a new project and add a button and change the text property to "open" and then add a rich text box and now it's time for codes , double click button and add these code

        If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
            Dim data() As Byte = System.IO.File.ReadAllBytes(OpenFileDialog1.FileName)
            RichTextBox1.Text = System.Text.Encoding.Unicode.GetString(data)

now debug and try it here is a preview :

  How To Make Unicode String Reader In VB.NET

it doesn't looks like unicode or whatever


Very useful ! You forgot "End If", but perfect ;)


Post a Comment

Note: Only a member of this blog may post a comment.