Magnifying a section of picture box

I have a user who want to select a magnifying control, (could be anything, say radio button or button)

Then when he clicks the point in the image that wants magnifying, the relative area surrounding the selected point is expanded to fill the picture box

This is not a case where the image is enlarged and you have to negotiate to the point you are interested in

so, if say you had a jpg with a composite of boxes with numbers in, of 7-9 on top row, 4-6 in middle, 1-3 on the bottom, say like a photo taken of a portion of a keyboard number pad

ie 789
456
123

and you clicked say (dead centre of 5) the number 5 would fill the picture box, assuming all areas surrounding the numbers are equal and take up all the area of the jpg

TIA


Answer this question

Magnifying a section of picture box

  • ASAD LATIF

    if you are using VS05 then the picture box has a property called SizeMode. WHen you set it to "zoom" it will zoom the image in and out when changeing the size of the image!

    HTH



  • bc_Mark

    thanks for replying, I haven't tried that yet , I probably should have selected the number 8 for my example

    does this zoom expand around the area that has been clicked, I don't just want the image zoomed

    I want to see the surrounding area where the click event happens

  • Yijing

    Looks like I will have to put my thinking cap on to code this

    The bit I am not sure about is extracting desired area from original using mouse position as co-ordinate starting point of new image

    Thanks for your advice

  • Tampico

    does this zoom expand around the area that has been clicked

    No, you will have to do your own sizing

    I want to see the surrounding area where the click event happens

    Typically the mousedown event would be used to draw a rectangle in conjujnction with the mouse up event that would zoom to the user drawn rectangle

    HTH



  • Magnifying a section of picture box