Problem fetching 'Z' value from DEM

Aug 5, 2014 at 5:46 AM

I am trying to fetch 'Z' value(altitude) from SRTM DEM(in geotiff format) on MouseMove event.
I am currently using PixelToProj() function for achieving the same.

However, i am able to fetch X,Y(Lat,Long) value but Z(Altitude) value is always zero. Can anyone please advise why this is zero and also if this is not the correct procedure, how can this be achieved??

Thanks in anticipation