Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

How to change default map size?

This is a discussion on How to change default map size? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I'm... using MapPoint; // obviously In a c# usercontrol constructor, I've got: try { Streets = new ApplicationClass(); BackMap ...

  1. #1
    mpguy is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    1

    How to change default map size?

    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

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    If I have right understeand what you want is then you can set height and width of the map to height and width of your usercontrol and then copy it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change default color of route (VB6)
    By andreas in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-09-2005, 05:49 PM
  2. Change default road colours
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-21-2004, 04:17 PM
  3. How to change the default country setting
    By neo in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 08-13-2003, 01:29 PM
  4. Change default country
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-30-2002, 03:27 PM
  5. How do i change the default Line draw width (toolb....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-26-2001, 12:39 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96