Solved

How to open a form at a specific location?

Posted on 2008-11-01
3
1,469 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
Comment Utility
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
Comment Utility
before you show the form with Show() or ShowDialog(), change the Location property of the form.
0
 
LVL 9

Author Closing Comment

by:Hawkvalley1
Comment Utility
Thanks...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

11 Experts available now in Live!

Get 1:1 Help Now