GetMinimumSize Method

Example-VB

Determines the smallest non-scrolling control dimension that can be used to display a specified number of thumbnail boxes.

Available With

Ö Imaging for Windows Professional Edition V1.0, V1.1, and V2.0
Ö Imaging for Windows 95 and 98
Ö Imaging for Windows NT 4.0

Applies To

Image Thumbnail control

Syntax

object.GetMinimumSize(ThumbCount,ScrollBar)

Arguments

Parameter Data Type Description

ThumbCount Long The number of thumbnail boxes desired in the non-scrolling direction
ScrollBar Boolean Indicates whether or not the size value returned allows space for a scroll bar.

True Allows space for a scroll bar.
False Does not allow space for a scroll bar.


Return Value

Long

The minimum control size needed to accommodate the number of thumbnail boxes specified by the ThumbCount parameter.

Remarks

GetMinimumSize uses the current values of the ScrollDirection, ThumbHeight, and ThumbWidth properties to calculate this value.

GetMaximumSize and GetMinimumSize should be used together to determine a range of control sizes that allow for a display that fits the required number of thumbnails in the non-scrolling dimension.

A control size smaller than this dimension in the non-scrolling direction will contain space for fewer than the specified number of thumbnails.

Once a control size is determined (based on results of GetMaximumSize and GetMinimumSize), a call to the GetScrollDirectionSize method can be used to calculate the size required in the scrolling direction to display a specified number of thumbnails.