Solved

How To Place A Command Button At X and Y Location Using Code

Posted on 2006-11-30
3
231 Views
Last Modified: 2010-04-23
Hi,

I’m using VS.NET 2005.  I have a command button called btnEnter.  I need to place the btnEnter at different x and y form locations based on certain events.  How would I write this in code?  I would like the button to be at the following location:

X=429
Y=17

The following code did not work:

Me.btnEnter.Location.X = "429"
Me.btnEnter.Location.Y=”17

Thanks,
Denise
0
Comment
Question by:DeniseGoodheart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 300 total points
ID: 18049711
Try...

    Me.btnEnter.Location = New Point(429, 17)
0
 
LVL 16

Assisted Solution

by:Hillwaaa
Hillwaaa earned 200 total points
ID: 18049712
Hi DeniseGoodheart,

Use:

        Me.btnEnter.Top = 17
        Me.btnEnter.Left = 429

Assuming your x and y work from the top left?

Cheers,
Hillwaaa
0
 

Author Comment

by:DeniseGoodheart
ID: 18049855
Thanks Idle Mind and Hillwaaa.  They both work great!

Cheers,
Denise
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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