I suggest that you wrap the Form Load Event code in an
If Not Me.DesignMode
block so that it will only get executed when you are running the program.
Suggested Change
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Me.DesignMode then
... Form Load Event code goes here ...
End If
End Sub