private void BatchPrintDialog()
{
MxDrawPrint print = new MxDrawPrint();
// 開始列印.
print.BeginNestedPrint();
//iFlag = 0表示頁邊距,iFlag = 1表示列印區域矩形框位置
print.Flag = 1;
// 列印區位置(10,10,200,100),坐标系統是,X從左到右,Y從上到下.
//列印的頁邊距的左邊距離
print.dLeftPageMargin = 10;
//列印的頁邊距的上邊距離
print.dTopPageMargin = 10;
//列印的頁邊距的右邊距離
print.dRightPageMargin = 200;
//列印的頁邊距的下邊距離
print.dBottomPageMargin = 100;
// 把螢幕顯示内容進行的列印,列印第一個控件。
axMxDrawX1.MakeCurrentOcx();
print.PrintScreen();
// 列印區位置(10,110,200,210),坐标系統是,X從左到右,Y從上到下.
//列印的頁邊距的上邊距離
print.dTopPageMargin = 110;
//列印的頁邊距的下邊距離
print.dBottomPageMargin = 210;
// 把螢幕顯示内容進行的列印,列印第二個控件。
axMxDrawX2.MakeCurrentOcx();
print.PrintScreen();
//結束嵌套列印
print.EndNestedPrint();
}