Solved

How to open a form at a specific location?

Posted on 2008-11-01
3
1,487 Views
Last Modified: 2012-05-05
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
Comment
Question by:Hawkvalley1
3 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 100 total points
ID: 22859856
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
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 22859866
before you show the form with Show() or ShowDialog(), change the Location property of the form.
0
 
LVL 9

Author Closing Comment

by:Hawkvalley1
ID: 31512431
Thanks...
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question