Image.SelectActiveFrame(FrameDimension, Int32) Method

Definition

Selects the frame specified by the dimension and index.

C#
public int SelectActiveFrame(System.Drawing.Imaging.FrameDimension dimension, int frameIndex);

Parameters

dimension
FrameDimension

A FrameDimension that specifies the identity of the dimension type.

frameIndex
Int32

The index of the active frame.

Returns

Always returns 0.

Remarks

The possible values of the dimensionID parameter are properties of the FrameDimension. These can be used to identify an image by its time, resolution, or page number.

Calling this method causes all changes made to the previous frame to be discarded. Before selecting another frame, save all changes made to the current frame, including changes to pixel values and properties. If the call to the SelectActiveFrame method is successful (an exception does not occur), the method will return 0.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9