阅读:1273回复:1
为何我的flashshape方法没有效果?(急啊)
<P>ISimpleFillSymbol pFillsyl = new SimpleFillSymbol();<BR>pFillsyl.Color = mapcontrol_inte.GetRGBColor(220, 60, 60);<BR>this.mapcontrol_inte3.MapControl1.FlashShape(pFeature2.Shape,3,300,pFillsyl);<BR>this.mapcontrol_inte3.MapControl1.Extent = pFeature2.Shape.Envelope;<BR> </P>
<P>我用 MessageBox.Show(pFeature2.get_Value(2).ToString());测试pFeature2的各项参数是正确的,但运行时就是地图没反应,怎么都不闪烁,可能是哪里的问题呢? 我的MapControl1是放在mapcontrol_inte这个用户控件里面的,这该没什么关系吧?</P> |
|
1楼#
发布于:2005-08-05 17:46
<P>来不及研究你的代码</P>
<P>贴上一个函数,已经测试过了</P> <P>'功能:Flash Geometry<BR>Private Sub flashGeo(pGeometry As IGeometry, intTimes As Integer)<BR>On Error GoTo errHandle:<BR> If pGeometry Is Nothing Then Exit Sub<BR> If pGeometry.IsEmpty Then Exit Sub<BR> Dim pActiveView As IActiveView<BR> Set pActiveView = ff_m_Map<BR> pActiveView.ScreenDisplay.StartDrawing 0, esriNoScreenCache<BR> <BR> Select Case pGeometry.GeometryType<BR> Case esriGeometryPolyline<BR> FlashLine pActiveView.ScreenDisplay, pGeometry, intTimes<BR> Case esriGeometryPolygon<BR> FlashPolygon pActiveView.ScreenDisplay, pGeometry, intTimes<BR> Case esriGeometryPoint<BR> FlashPoint pActiveView.ScreenDisplay, pGeometry, intTimes<BR> End Select<BR> <BR> pActiveView.ScreenDisplay.FinishDrawing<BR> <BR> Exit Sub<BR>errHandle:<BR> Err.Clear<BR>End Sub</P> |
|
|