When the user changes the size of the application, we want to make the list box bigger also.
We need to make sure that scroll bars appear on the list box if the number of items is too many to fit.
Select the list box. In the properties window set ScrollAlwaysVisible to True, and HorizontalScrollBar to True.
Double Click the form and you will be in the Form Load event.
Add the code shown below:
Private Sub Form1_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize
ListBox1.Width = Me.Width - 30 'leave room for the scroll bars
ListBox1.Height = Me.Height - ListBox1.Location.Y - 30 'below the menu
End Sub
See the complete code at this point.