>>>WITH _SCREEN.SYSTEM.Drawing >>> * Load the multiframe TIFF to GDI+ >>> this.oMultif = .BITMAP.New(ALLTRIM(THIS.cSourceFile)) >>> this.nFrames = this.oMultif.GetFrameCount() >>> this.txt3.Refresh() >>> IF this.nFrames > 1 >>> this.nPictureCounter=0 >>> this.oMultif.SelectActiveFrame(.Imaging.FrameDimension.PAGE, this.nPictureCounter) >>> This.Image1.PictureVal = this.oMultif.GetPictureVal(.Imaging.ImageFormat.Tiff) >>> ELSE >>> MESSAGEBOX("The selected file is not a Multiframe TIFF",0,'',5000) >>> *this.oMultif.SelectActiveFrame(.Imaging.FrameDimension.PAGE, this.nPictureCounter) >>> This.Image1.Picture = ALLTRIM(THIS.cSourceFile) >>> >>> ENDIF >>> >>>>>>
this.oMultif.GetFrameCount()
>>this.nFrames = this.oMultif.GetFrameCount() + 1Before you say. I agree it's really strange to receive the ZERO value when you have one frame, but that's how GdiPlus.dll works, and the .NET samples work too.