I'm experimenting with the idea of replacing my dynamic display moving graphics with the static (DynamicDisplayEnabled = false) moving graphics.
public class CustomLayer : BaseCustomLayer
{
public override void Draw(esriDrawPhase drawPhase, IDisplay Display, ITrackCancel trackCancel)
{
int hdc = Display.hDC;
IntPtr p = new IntPtr(hdc);
Graphics graphics = Graphics.FromHdc(p);
Image newImage = Image.FromFile(carImage);
System.Drawing.Point ulCorner = new System.Drawing.Point(x, y);
graphics.DrawImage(newImage, ulCorner);
}
}
This code draws the image, but it only invokes draw once, unless I move the map with the pan tool or change the scale. How can I make the Draw function fire multiple times a second?