//引用
using System.Drawing;
using System.Drawing.Imaging; //以下是方法
private Bitmap myImage = null;
private Byte[] Faxbyte = null;
private FrameDimension fds; memStream = new MemoryStream(Faxbyte);
myImage = new Bitmap(memStream); #region 分页
Guid gud = (Guid)myImage.FrameDimensionsList.GetValue();
fds = new FrameDimension(gud);
int totalPage = myImage.GetFrameCount(fds); //多页用combobox切换
if (totalPage > )
{
for (int i = ; i <= totalPage; i++)
{
cboPages.Items.Add(new ListItems(i.ToString(), i.ToString()));
} myImage.SelectActiveFrame(fds, );
FaxImage.Image = myImage;
FaxImage.SizeMode = PictureBoxSizeMode.AutoSize;
cboPages.Text="";
}
#endregion //Combobox 切换事件
private void cboPages_SelectionChangeCommitted(object sender, EventArgs e)
{
myImage.SelectActiveFrame(fds, Convert.ToInt32(cboPages.Text) - );
FaxImage.Image = myImage;
}