title: File size in vb.net
body: <p>In Form1 I have a Textbox1, in this textbox I have the location of a file "C:\folder\file.iso"</p>
  
  <p>In the Form2 I want to get the file size of the file in Textbox1 so I tried this</p>
  
  <pre><code>        Dim fileDetail As IO.FileInfo
  
  
      fileDetail = My.Computer.FileSystem.GetFileInfo(Form1.Textbox1.Text)
  
      Label1.Text = Size: fileDetail.Length
  End Sub
  </code></pre>
  
  <p>I dont get an error, but the size of the file isn't showed in the label.</p>
  
  <p>Edit: This doesn't seem to work</p>
  
  <pre><code>Private Sub Unscramble_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      If System.IO.File.Exists(Form1.TextBox2.Text) Then
          Dim fi As New System.IO.FileInfo(Form1.TextBox2.Text)
          Label3.Text = "Size: " &amp; fi.Length.ToString()
      End If
  End Sub
  </code></pre>
  
  <p>It still doesn't give me the size of the file nor it gives the "Size:" </p>