private void btnPrintM_Click(object sender, EventArgs e) { if (dgvData.RowCount <= 0) { return; } if (dgvData.SelectedRows.Count == 0) { return; } List <string> imgList = new List <string>(); foreach (DataGridViewRow dr in dgvData.SelectedRows) { string strexamno = dr.Cells["MID"].Value.ToString(); string strImagePath = string.Format(BChaoReport + @"\{0}.jpg", strexamno); imgList.Add(strImagePath); } if (imgList.Count > 0) { string pPath = BChaoReport + @"\temp.tiff"; CommonExtensions.JoinTiffImages(imgList, pPath, EncoderValue.CompressionCCITT3); CommonExtensions.ShellExecute(IntPtr.Zero, "Print", pPath, "", "", 0); } }