nuoya_design
路人甲
路人甲
  • 注册日期2006-07-18
  • 发帖数2
  • QQ
  • 铜币117枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1187回复:0

[求助]把地图保存为图片出错

楼主#
更多 发布于:2006-08-01 09:03
<P>'            CoMDlg.FileTitle = "把地图保存为图片"<BR>            CoMDlg.fileName = ""<BR>            CoMDlg.Filter = "JPG图片(*.JPG)|*.jpg"<BR>            CoMDlg.ShowSave<BR>            If CoMDlg.fileName <> "" Then<BR>                Dim lScrRes As Long<BR>                lScrRes = Me.MapCtr.ActiveView.ScreenDisplay.displayTransformation.Resolution<BR>                <BR>                Dim pExporter As IExporter<BR>                Set pExporter = New JpegExporter<BR>                pExporter.ExportFileName = CoMDlg.fileName<BR>                pExporter.Resolution = lScrRes<BR>                Dim deviceRECT As tagRECT<BR>                deviceRECT = Me.MapCtr.ActiveView.ScreenDisplay.displayTransformation.DeviceFrame<BR>                Dim pDriverBounds As IEnvelope<BR>                 <FONT color=#ff3300>Set pDriverBounds = New Envelope</FONT></P>
<P>                pDriverBounds.PutCoords deviceRECT.Left, deviceRECT.Bottom, deviceRECT.Right, deviceRECT.Top<BR>                pExporter.PixelBounds = pDriverBounds<BR>                Dim pCancel As ITrackCancel<BR>                Set pCancel = New CancelTracker<BR>                Me.MapCtr.ActiveView.Output pExporter.StartExporting, lScrRes, deviceRECT, Me.MapCtr.ActiveView.Extent, pCancel<BR>                pExporter.FinishExporting<BR>            End If</P>

<P>Set pDriverBounds = New Envelope 这句报错,说无效使用new关键字</P>
<P>说明:这段代码由vb.net改正过来的 ,在vb.net里能运行,转到vb就不可以。</P>
<P><BR> </P>
喜欢0 评分0
游客

返回顶部