newbieneedshelp

I simply want Form2 Location when loaded to be offset from form1. I can't seem to figuire this out. I got this so far.


Private Sub btnNEW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNEW.Click

Form2.Location = Me.Location
Form2.Show()
End Sub


This works but I want form2 to be offset a distance of 200 for both X and Y locations of Form1




Re: Visual Basic Language Form load offset

TaDa

Try something like:

Form2.Location = New Point(Me.Location.x + 200, Me.Location.y + 200)





Re: Visual Basic Language Form load offset

nogChoco

Add this line as well:
Form2.StartPosition = FormStartPosition.Manual