Solved

How to open a form at a specific location?

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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