Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Form.Location

$
0
0

I want to display form2 just a little lower and to the right of form1.

        Dim frm2 As New Form2
        frm2.Location = New Point(Me.Location.X + 102, Me.Location.Y + 102)
        frm2.Show()

If I run the project and click the menu item that contains the code above, frm2 is displayed in the correct place.

If I close frm2 and then move form1 and then click the menu item again, frm2 is displayed in the same place it did the first time. I put a breakpoint in so I could see the values of me.location.x and it does change. But frm2 is not displayed there.

What am I doing wrong?


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>