Results 1 to 4 of 4

Thread: Locating An Object

  1. #1

    Thread Starter
    Hyperactive Member StreaksAthlete's Avatar
    Join Date
    Sep 2004
    Posts
    348

    Exclamation Locating An Object

    Does anybody know how to locate a control by its coordinates.
    For Example, i have a label1, a label2, and a command button. When i click the command button i want the text of label 2 to have the name of the control(label1) at a certain point on the form.
    If anyone understands what i'm trying to say, can you help me?
    Unity Programs™ - Downloads To Make Your Computer Life Easier - UnityPrograms.com, check it out
    My small company, I need feedback.


    If someone's post was useful, don't forget to Rate It by clicking the Rate This Post link under the avatar.
    If this post has been resolved. Please mark it as Resolved by going through the Thread Tools above and clicking on the Mark Thread Resolved option.
    We ride together, We die together, .NET for life. - Working With Visual Studio.NET 2005

    Application Deployment, General Developer Forum, Visual Basic .NET

  2. #2
    Hyperactive Member fret's Avatar
    Join Date
    Sep 2004
    Posts
    472

    Re: Locating An Object

    i can't clearly understand of your problem.

    For Example, i have a label1, a label2, and a command button. When i click the command button i want the text of label 2 to have the name of the control(label1)
    you mean that if you click the command button the value text in the label2 will come from the value of label1?
    at a certain point on the form.
    what particular coordinates? from label1 or label2?

    please discuss it very well so that others might help you.
    cheers.

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Locating An Object

    Quote Originally Posted by StreaksAthlete
    Does anybody know how to locate a control by its coordinates.
    For Example, i have a label1, a label2, and a command button. When i click the command button i want the text of label 2 to have the name of the control(label1) at a certain point on the form.
    If anyone understands what i'm trying to say, can you help me?
    Loop through all the controls on the form and test whether the x,y point falls within the control's area.

    Bear in mind that sometimes you'd get controls within controls (panels and groupboxes) and so you might get a few controls overlapping the coordinate in question.
    I don't live here any more.

  4. #4

    Thread Starter
    Hyperactive Member StreaksAthlete's Avatar
    Join Date
    Sep 2004
    Posts
    348

    Re: Locating An Object

    OK, I like the loop idea, but i'm new and i dont have a clue how to do that. Could you give me the code please.
    Unity Programs™ - Downloads To Make Your Computer Life Easier - UnityPrograms.com, check it out
    My small company, I need feedback.


    If someone's post was useful, don't forget to Rate It by clicking the Rate This Post link under the avatar.
    If this post has been resolved. Please mark it as Resolved by going through the Thread Tools above and clicking on the Mark Thread Resolved option.
    We ride together, We die together, .NET for life. - Working With Visual Studio.NET 2005

    Application Deployment, General Developer Forum, Visual Basic .NET

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width