<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic problem using IDisplay.DrawPolygon &amp;amp;amp; screen refresh in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640244#M17215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Scole&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ported over a "zoom to parcel" tool from VBA to VB.NET and, in the process I wanted to change part of its functionality. Originally, my script added a graphic polygon element to the display to let the user know which parcel was the one they were interested in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to modify this so that the parcel highlight was only drawn to the screen temporarily instead of added as a graphic element. I re-wrote this section of my code to use IDisplay.DrawPolygon but when the code is actually run, the events seem out of sequence. Here's the relevent code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pEnvelope = pGeometry.Envelope
pEnvelope.Expand(1.5, 1.5, True)

pActiveView.Extent = pEnvelope
pActiveView.refresh

pScreenDisplay = pActiveView.ScreenDisplay
pScreenDisplay.StartDrawing(pScreenDisplay.hDC, CShort(ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache))
pScreenDisplay.SetSymbol(pFillSymbol)
pScreenDisplay.DrawPolygon(pGeometry)
pScreenDisplay.FinishDrawing()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, from the user experience side, here's the order of events as I witness them:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;display zooms to the extent of the parcel&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;the parcel outline draws (the DrawPolygon step)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;the actual parcel features draw&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;It all happens very fast but the drawing of the data features wipes out my DrawPolygon highlight. How do I get the order of events to behave the way I have coded them??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried throwing a System.Threading.Thread.Sleep() statement into the mix but it doesn't correct the issue; it literally just delays it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:12:29 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-12T03:12:29Z</dc:date>
    <item>
      <title>problem using IDisplay.DrawPolygon &amp;amp; screen refresh</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640244#M17215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Scole&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ported over a "zoom to parcel" tool from VBA to VB.NET and, in the process I wanted to change part of its functionality. Originally, my script added a graphic polygon element to the display to let the user know which parcel was the one they were interested in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to modify this so that the parcel highlight was only drawn to the screen temporarily instead of added as a graphic element. I re-wrote this section of my code to use IDisplay.DrawPolygon but when the code is actually run, the events seem out of sequence. Here's the relevent code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pEnvelope = pGeometry.Envelope
pEnvelope.Expand(1.5, 1.5, True)

pActiveView.Extent = pEnvelope
pActiveView.refresh

pScreenDisplay = pActiveView.ScreenDisplay
pScreenDisplay.StartDrawing(pScreenDisplay.hDC, CShort(ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache))
pScreenDisplay.SetSymbol(pFillSymbol)
pScreenDisplay.DrawPolygon(pGeometry)
pScreenDisplay.FinishDrawing()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, from the user experience side, here's the order of events as I witness them:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;display zooms to the extent of the parcel&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;the parcel outline draws (the DrawPolygon step)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;the actual parcel features draw&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;It all happens very fast but the drawing of the data features wipes out my DrawPolygon highlight. How do I get the order of events to behave the way I have coded them??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried throwing a System.Threading.Thread.Sleep() statement into the mix but it doesn't correct the issue; it literally just delays it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640244#M17215</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T03:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem using IDisplay.DrawPolygon &amp; screen refresh</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640245#M17216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Scole&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wanted to bump this since I still haven't figured this out. I also forgot to ask someone from ESRI about this while I had my chance at the UC. Doh!..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 19:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640245#M17216</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-07-27T19:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem using IDisplay.DrawPolygon &amp; screen refresh</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640246#M17217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Where are you calling this code from?&amp;nbsp; If you're not calling it inside the IActiveviewEvents.AfterDraw event then whatever you draw will disappear the next time anything causes the screen to refresh.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 20:06:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640246#M17217</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-07-27T20:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: problem using IDisplay.DrawPolygon &amp; screen refresh</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640247#M17218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Scole&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Neil,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for not making that clear- this code snippet is at the very end of a Ok button click() event from a dialog (to obtain the parcel number from the user). I understand that my drawing will disappear upon the next redraw and that's ok. I just wanted to give the user a brief visual on which parcel was the one they specified and did not want to clutter the document with graphic elements if I didn't need to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm just at a loss to explain how the actual display redraw after zooming into the extent of the parcel happens AFTER the drawPolyon code despite being before the drawPolygon line of code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 20:32:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640247#M17218</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-07-27T20:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: problem using IDisplay.DrawPolygon &amp; screen refresh</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640248#M17219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's probably getting overwritten because the pActiveView.Refresh call hasn't finished.&amp;nbsp; The call to Refresh will return before the actual refreshing of the map is complete.&amp;nbsp; You will probably have to add the drawing code to the AfterDraw event or listen for the DisplayFinished event and execute the drawing code after it has fired.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 20:46:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640248#M17219</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-07-27T20:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: problem using IDisplay.DrawPolygon &amp; screen refresh</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640249#M17220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Scole&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Neil. What you describe makes sense. I decided to pursue your suggestion and implemented an event listener on the AfterDraw event. I wasn't quite sure how to do it since I've never done one before but, after some reading up on the issue, it seems to work like I want it to. For the benefit of others, here's what I did:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the event listener code for the .NET snippet named "Add Event Wiring for All IActiveViewEvents Snippet." To backtrack, my code to zoom to a parcel's extent is contained in the click event of a dialog form. In the declaractions part of the VB code for the form, I inserted:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private m_ActiveViewEventsAfterDraw As ESRI.ArcGIS.Carto.IActiveViewEvents_AfterDrawEventHandler
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGeometry As ESRI.ArcGIS.Geometry.IGeometry = Nothing&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The event handler requires a small subroutine to initiate it so I added the following into the main body of VB code for my form:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub SetupActiveViewEvents(ByVal map As ESRI.ArcGIS.Carto.IMap)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If map Is Nothing Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim activeViewEvents As ESRI.ArcGIS.Carto.IActiveViewEvents_Event = TryCast(map, ESRI.ArcGIS.Carto.IActiveViewEvents_Event)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Create an instance of the delegate, add it to AfterDraw event
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_ActiveViewEventsAfterDraw = New ESRI.ArcGIS.Carto.IActiveViewEvents_AfterDrawEventHandler(AddressOf OnActiveViewEventsAfterDraw)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler activeViewEvents.AfterDraw, m_ActiveViewEventsAfterDraw
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That could is straight off of the snippet. Nothing custom yet. The next thing I inserted was the subroutine that gets triggered by the AfterDraw event and it is also inserted into the main body of VB code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub OnActiveViewEventsAfterDraw(ByVal display As ESRI.ArcGIS.Display.IDisplay, ByVal phase As ESRI.ArcGIS.Carto.esriViewDrawPhase)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Highlight the parcel's shape on screen
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pFillSymbol As ESRI.ArcGIS.Display.ISimpleFillSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pLineSymbol As ESRI.ArcGIS.Display.ILineSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRgbColor As ESRI.ArcGIS.Display.IRgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pScreenDisplay As ESRI.ArcGIS.Display.ScreenDisplay = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pActiveView As ESRI.ArcGIS.Carto.IActiveView

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not pGeometry Is Nothing And phase = ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewForeground Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pActiveView = My.ArcMap.Document.FocusMap

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFillSymbol = New ESRI.ArcGIS.Display.SimpleFillSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRgbColor = New ESRI.ArcGIS.Display.RgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pLineSymbol = pFillSymbol.Outline

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRgbColor.Red = 255

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pLineSymbol.Width = 2.25
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pLineSymbol.Color = pRgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFillSymbol.Color = pRgbColor

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFillSymbol.Outline = pLineSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFillSymbol.Style = ESRI.ArcGIS.Display.esriSimpleFillStyle.esriSFSHollow

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pScreenDisplay = pActiveView.ScreenDisplay
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pScreenDisplay.StartDrawing(pScreenDisplay.hDC, CShort(ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pScreenDisplay.SetSymbol(pFillSymbol)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pScreenDisplay.DrawPolygon(pGeometry)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pScreenDisplay.FinishDrawing()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeometry = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything in the sub is what I wrote. I had to give this subroutine a way to access the parcel's geometry so that is why I declared it globally at the top of the class. I also discovered that the AfterDraw event is triggered multiple times during one redraw (due to the various "phases"). The esriViewForeground is the last phase in the sequence so that's why I specifcally mention it in my IF..THEN block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's also important to set the geometry to Nothing at the end of this routine. If you do not, it will keep drawing the shape on the screen (even though the form is dismissed).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The last step is very simple. In the subroutine for my form's OK button click event, I added this line to actually fire off the event listener:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SetupActiveViewEvents(pMap)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's it. The display zooms to the parcel and it gets a red outline. The next display refresh wipes it clean. Thanks again for the pointing me in the right direction, Neil!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-idisplay-drawpolygon-amp-amp-screen/m-p/640249#M17220</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T03:12:32Z</dc:date>
    </item>
  </channel>
</rss>

