Imports System.Drawing.Image
________________________________
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Sets the tiff file as an image object.
Dim objImage As Drawing.Image
objImage = objImage.FromFile(txtAddress.Text)
Dim objGuid As Guid = (objImage.FrameDimensionsList(0))
Dim objDimension As System.Drawing.Imaging.FrameDimension = New System.Drawing.Imaging.FrameDimension(objGuid)
'Gets the total number of frames in the .tiff file
Dim totFrame As Int16
totFrame = objImage.GetFrameCount(objDimension)
'Adds number of frames to the combo box for displaying purposes.
Dim i As Integer
For i = 0 To totFrame - 1
cboFrameNo.Items.Add(i)
Next
cboFrameNo.Items.IndexOf(1)
'Sets the temporary folder to "C:\temp\"
Dim strPath As String
strPath = "c:\temp\"
'Saves every frame as a seperate file.
Dim z, curF As Integer
z = 0
curF = 0'curF是页码
For z = 0 To 1'(totFrame - 1)
objImage.SelectActiveFrame(objDimension, curF)
objImage.Save(strPath & curF & ".tif", Imaging.ImageFormat.Tiff)
curF = curF + 1
Next