geting the x and y postion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • radom
    New Member
    • Feb 2008
    • 37

    geting the x and y postion

    How do I get the x and y postion of an object this is what I tryed I am useing vb 2008
    TextBox1.Text = TextBox1.Locati on
  • daniel aristidou
    Contributor
    • Aug 2007
    • 494

    #2
    Originally posted by radom
    How do I get the x and y postion of an object this is what I tryed I am useing vb 2008
    TextBox1.Text = TextBox1.Locati on
    Ok...your close....
    I thinks its best to do it like this
    [CODE=vb]
    Dim txt1ypos as integer
    Dim txt1xpos as integer
    txt1ypos = textbox.locatio n.y
    txt1xpos = textbox.locatio n.x
    Textbox1.text = "Y = " & txtypos & " X = " & txt1xpos
    [/CODE]
    Hope this helps!!
    ps:might be position.x instead of location.x..... .Cant remember but its one of the 2

    Comment

    Working...