private delegate void DrawOnPanelCircleDelegate(Point pp, Bitmap r ); public void DrawOnPanelCircle(Point p, Bitmap ratImage) { if (InvokeRequired) { DrawOnPanelCircleDelegate drwOnPanelCircle = new DrawOnPanelCircleDelegate((pp, r) => DrawOnPanelCircle(p, ratImage)); this.BeginInvoke(drwOnPanelCircle, new object[] { p, ratImage }); } lock (_locker) { this.agentBox .Image = ratImage; this.agentBox.SizeMode = PictureBoxSizeMode.StretchImage; //this.Invoke((MethodInvoker)delegate //{ this.agentBox.Left = p.X; this.agentBox.Top = p.Y; //}); // Application.DoEvents(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)