Your simplified solution is not correct. As I suggested in a previous post there is a problem when the area displayed to the end-user is not a square. That is almost always the case. That would usually be a wide rectangle. (I actually use this approximation as a temporary workaround)
But the code you provide may be the answer. I don't have time to try it now, but I assume vprt.Height and vprt.Width would be enough to know the get the real size displayed to the end-user.
It works perfectly and good enough for me to determine whether a zoom has occured from a saved state, which was the original posted issue - a couple of years back
Hope you can make use of my sample code anyway.