File size in vb.net -


in form1 have textbox1, in textbox have location of file "c:\folder\file.iso"

in form2 want file size of file in textbox1 tried this

        dim filedetail io.fileinfo       filedetail = my.computer.filesystem.getfileinfo(form1.textbox1.text)      label1.text = size: filedetail.length end sub 

i dont error, size of file isn't showed in label.

edit: doesn't seem work

private sub unscramble_load(byval sender system.object, byval e system.eventargs) handles mybase.load     if system.io.file.exists(form1.textbox2.text)         dim fi new system.io.fileinfo(form1.textbox2.text)         label3.text = "size: " & fi.length.tostring()     end if end sub 

it still doesn't give me size of file nor gives "size:"

    dim filedetail = my.computer.filesystem.getfileinfo(form1.textbox1.text)     label1.text = "size : " & filedetail.length 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -