Results 1 to 5 of 5

Thread: getting pictured co-ordinates from mouse

  1. #1

    Thread Starter
    Lively Member brjames's Avatar
    Join Date
    Jan 2000
    Location
    Tenby, Wales, UK
    Posts
    121
    I need to get the co-ordinates of some parts of a photo using the mouse and a text box, so that when the user clicks on an certain part of the photo, another form loads up that has information about that individual item. Can anyone help me do this as i've done it before but cannot remember how I did it?

    Thanks in advance!

  2. #2
    Junior Member
    Join Date
    Jan 2000
    Location
    WALES UK
    Posts
    31
    Well what you have to do see good boy is take einsteins theory of relativity and then multiply that by pythagoras's theoram drink ten pints of mongbow have a lay down and then it will once again return to your knowledge banks...if that doesnt work u could always drink ten more pints!!

    C ya Ben Gboy

    Rhys

  3. #3
    Junior Member
    Join Date
    Jan 2000
    Location
    cardiff
    Posts
    17
    ben use the bit of code i give you to find the co ordinates and in a picture1_click type

    if X<() and X>() and Y<() and Y>() then
    load form2
    form2.show
    unload form1

    in the () put the cordinates

  4. #4
    Guest

    Lightbulb

    Hello brjames,

    I've had the very same problem to solve, except it was for setting the location on an item via a mouse click on the picbox. I looked for the app that I wrote this for but to no avail. I can only tell you what I remember doing to make this happen.

    If you look at the help file for the picbox you will see that you can set the pic1.ScaleTop, pic1.ScaleHeight, pic1.ScaleWidth and pic1.ScaleLeft. This is very important to this operation. You will need to get the coordinates for each corner of your map, once you have this then you can assign the coordinates in radiants to the 4 pic1.Scale... properties. You can then use the pic1.X and pic1.Y values convert them to deg. min. sec and then display them in the textbox.

    Hope this helps a little,

    Roger

  5. #5
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535
    You can download Microsoft's DirectX 7 DSK or can get it from CHIP computer magazine's few month's back cd if you are from US or India. I don't know wheteher it is available in other countries also.

    They have given a very nice tutorial of displaying mouse co-ordinates.

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