Solved

How to open a form at a specific location?

Posted on 2008-11-01
3
1,478 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now