|
阅读:683回复:0
mapx+c#的打印问题求助
private void menuItem6_Click(object sender, System.EventArgs e)
{ PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler (this.pd_PrintPage); PrintDialog MyDialog = new PrintDialog(); MyDialog.Document=pd; if (MyDialog.ShowDialog() == DialogResult.OK) { pd.Print(); } } private void pd_PrintPage(object sender, PrintPageEventArgs ev) { axMap1.PrintMap(ev.Graphics.GetHdc().ToInt32(),0,0,axMap1.Width*100,axMap1.Height*100); } <P>上面是我写的mapx+c#的打印代码,但是调试时一打印就报错,说打印机正在使用,然后居然可以打印出来,但是打印内容只是界面显示内容的很小一部分,比如说程序界面显示中国地图,打印到A4纸上只显示北京地图大小的范围,哪位大侠指点一下吧,多谢!</P> |
|