title: autosize window to fit datagradview vb.net
body: <p>Is it possible in vb.net to autosize the form window to change it width to the datagridview width?</p>
  
  <p>I have kept looking for a while now but can only find on how to resize the datagridview itself.</p>
  
  <p>This is code for prepare Datagridview</p>
  
  <pre><code>Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
     Dim rowvalue As String Dim cellvalue(20) As String 
     Dim streamReader As IO.StreamReader = New IO.StreamReader("test.csv") 
  
     While streamReader.Peek() &lt;&gt; -1 
       rowValue = streamReader.ReadLine() 
       cellvalue = rowvalue.Split(","c) 
       DataGridView1.Rows.Add(cellValue) 
     End While 
  
     streamReader.Close() 
   End Sub 
  </code></pre>
  
  <p>Thanks,</p>