coordinates in panel and image

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Asaf Dan

    #1

    coordinates in panel and image

    Hi,

    I'm using a panel to show an image.
    The Image could be bigger or smaller than the panel.
    I want to show the pixel coordinates of the image on a label next to the
    panel.
    I'm using an event but i cant get to show the real image pixel's
    coordinates.
    I would appreciate any kind of help.

    Thanks, Asaf.


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: coordinates in panel and image

    Asaf,

    What do you mean the pixel coordinates? Since you have an instance of
    the Image class (or a class derived from it) you can get the height and the
    width of the image. Also, you should know where on the panel the image is
    being painted. That should give you all the information you need.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "Asaf Dan" <adan@iai.co.il > wrote in message
    news:%23r5FjAcV DHA.1316@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > Hi,
    >
    > I'm using a panel to show an image.
    > The Image could be bigger or smaller than the panel.
    > I want to show the pixel coordinates of the image on a label next to the
    > panel.
    > I'm using an event but i cant get to show the real image pixel's
    > coordinates.
    > I would appreciate any kind of help.
    >
    > Thanks, Asaf.
    >
    >[/color]


    Comment

    Working...