Hello,
I'm...
using MapPoint; // obviously
In a c# usercontrol constructor, I've got:
try
{
Streets = new ApplicationClass();
BackMap = Streets.ActiveMap;
}
catch (Exception e)
{
status.Text = "MapPoint not available.";
status.Invalidate();
}
Then where I want to put a map on the background image of the usercontrol there's this:
object save = Clipboard.GetDataObject();
BackMap.GoToLatLong(lati, longi, alti);
BackMap.CopyMap();
Image image = Clipboard.GetImage();
Clipboard.SetDataObject(save);
this.BackgroundImageLayout = ImageLayout.Stretch;
this.BackgroundImage = image;
You can see I'm stretching it to fit my usercontrol. The usercontrol is square and I'd rather not modify the nice, clean bitmap output from MapPoint 2004 Object Library. On debugging, I found that image.Width == 776 and image.Height == 700.
I've seen a few posts wrt size but the answers all missed the mark. Is there a way to change the returned image size generated by MapPoint?
(BTW, I did try to use getpicturefromobject and got the generic exception in GDI+. I used the fromHBitmap method to no avail.)
Regards,
Guy