Table of contents

Report.PictureSizeMode 属性 (访问)Report.PictureSizeMode Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

可以使用图片缩放模式属性以指定调整窗体或报表的图片的大小。读取/写入字节You can use the PictureSizeMode property to specify how a picture for a form or report is sized. Read/write Byte.


表达式缩放模式expression. PictureSizeMode

表达式_一个表示报表对象的变量。_expression A variable that represents a Report object.


图片缩放模式属性使用以下设置。The PictureSizeMode property uses the following settings.

设置SettingVisual BasicVisual Basic说明Description
剪裁Clip00(默认值)图片以实际大小显示。如果图片比窗体或报表大,则按照窗体或报表的大小对图片进行剪裁。(Default) The picture is displayed in its actual size. If the picture is larger than the form or report, then the picture is clipped.
拉伸Stretch11将图片沿水平方向和垂直方向拉伸以填满整个窗体,这有可能破坏图片原有的长宽比例。The picture is stretched horizontally and vertically to fill the entire form, even if its original ratio of height to width is distorted.
缩放Zoom33在保持其原有长宽比例的情况下,将图片放大到最大尺寸。The picture is enlarged to the maximum extent possible while keeping its original ratio of height to width.
水平拉伸Stretch Horizontal44水平拉伸图片以适合窗体的宽度。The picture is stretched horizontally to fit the width of the form.
垂直拉伸Stretch Vertical55垂直拉伸图片以适合窗体的高度。The picture is stretched vertically to fit the height of the form.

一个小图片用于窗体或报表、 设置图片属性时图片缩放模式属性,拉伸或缩放会导致大量失真及其解决方法。较小的图片可以铺满整个窗体或报表中,通过使用图片平铺属性。When a small picture is used for the Picture property of a form or report, setting the PictureSizeMode property to Stretch or Zoom can cause substantial distortion of its resolution. Smaller pictures can be tiled across the entire form or report by using the PictureTiling property.


下面的示例将“订单输入”窗体的背景图片设为“Contacts.gif”,并按整个窗体的背景拉伸图片。The following example sets the background picture of the "Order Entry" form to "Contacts.gif", and stretches the picture to fit the entire form's background.

With Forms("Order Entry") 
 .Picture = "C:\Picture Files\Contacts.gif" 
 .PictureSizeMode = 1 
End With

另请参阅See also


报表对象Report Object

© 2018 Microsoft