Aquestion About an Exception in The MapImage Class???

Topics: Data Access, SharpMap Project, SharpMap v0.9 / v1.x
Jun 27, 2008 at 11:45 AM
I Got this Exception after I Run Any Form which  have The Map Image The Only Control On It And this Exception Threw from The Class of Map Image however i just added the 2 Dll (sharpMap,SharpMap.UI),It also threw if i missed up and clicked on the control,How could the exception throw from the source code which i just have it's DLL,By the way this exception Threw Here:


void MapImage_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)




if (_Map != null)



SharpMap.Geometries.Point p =

this._Map.ImageToWorld(new System.Drawing.Point(e.X, e.Y));



if (MouseMove != null)


MouseMove(p, e);


if (e.Location != mousedrag && !mousedragging && e.Button == MouseButtons.Left)



mousedragImg = (Image)



mousedragging =



}//////////////Here I Got The Exception ((((((Object reference not set to an instance of an object..))))))))


if (mousedragging)




if (MouseDrag != null)


MouseDrag(p, e);


if (this.ActiveTool == Tools.Pan)



System.Drawing.Image img =

new System.Drawing.Bitmap(this.Size.Width, this.Size.Height);


System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(img);



new System.Drawing.Point(e.Location.X - mousedrag.X, e.Location.Y - mousedrag.Y));




this.Image = img;




Jun 27, 2008 at 4:41 PM
My guess would be this.Image is null.