• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1533
  • Last Modified:

How to open a form at a specific location?

How would I open a form at a specific location, say the x and y of the mouse click or the coordinates of a control that is clicked on?
0
Hawkvalley1
Asked:
Hawkvalley1
1 Solution
 
Wayne Taylor (webtubbs)Commented:
Something like below, modifying the X and Y coordinates to suit.

Wayne
Dim frm As New Form2
With frm
    .StartPosition = FormStartPosition.Manual
    .Location = New Point(x:=100, y:=100)
    .Show()
End With

Open in new window

0
 
Jaime OlivaresSoftware ArchitectCommented:
before you show the form with Show() or ShowDialog(), change the Location property of the form.
0
 
Hawkvalley1Author Commented:
Thanks...
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now