title: Change the size of the text and shape using vertical and horizontal scroll
body: <p>I'm using Visual basic 2012 Ultimate. I want to change the Font size of the text using vertical and horizontal scroll. I tried but the size of the shape changes but not the Text.</p>
  
  <p>Here is the code</p>
  
  <pre><code>Private Sub HScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar1.Scroll
      RectangleShape1.Width = HScrollBar1.Value
      HScrollBar1.Value = TextBox1.Text.
  
  End Sub
  
  Private Sub VScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles VScrollBar1.Scroll
      RectangleShape1.Height = VScrollBar1.Value
      VScrollBar1.Value = TextBox1.Text.Size()
  
  End Sub
  </code></pre>