开发者

VB6: Getting image size in pixels

I put a picture box on a form and loaded some picture on it:

View1.Picture = LoadPicture(App.Path & "\sample2.bmp")

When I tried to get the width and height of the Picture property, th开发者_StackOverflow社区e values I received are not in pixels nor twips. Does anybody knows how to determine the size of an image in pixels in Visual Basic 6?


They are in himetrics.

Use

With View1
  MsgBox .ScaleX(.Picture.Width, vbHimetric, vbPixels)
  MsgBox .ScaleY(.Picture.Height, vbHimetric, vbPixels)
End With
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜