Actually, the reason GetBitmapDimensionsEx doesn't work with picture boxes is simple, and quit clearly documented in the API SDK reference:
So unless whoever creates the bitmap bothers to call SetBitmapDimensionEx:GetBitmapDimensionEx
The GetBitmapDimensionEx function retrieves the dimensions of a bitmap. The retrieved dimensions must have been set by the SetBitmapDimensionEx function.
These functions are, effectively, useful only for storing application-defined values in a bitmap. Why MS decided to implement them is beyond me.SetBitmapDimensionEx
The SetBitmapDimensionEx function assigns preferred dimensions to a bitmap. These dimensions can be used by applications; however, they are not used by the system.




Reply With Quote