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 use GetPictureFromObject() or CopyMap() IN C# ???

This is a discussion on How to use GetPictureFromObject() or CopyMap() IN C# ??? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi I really get mad! I dont know how to copy an image that is got from GetPictureFromObject() to a ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    How to use GetPictureFromObject() or CopyMap() IN C# ???

    Hi

    I really get mad! I dont know how to copy an image that is got from GetPictureFromObject() to a PictureBox.Image, in C# ?

    I also tried to use CopyMap() to put it in the clipboard then (Image) Clipboard.GetDataObject() to copy it in a PictureBox.Image but it does not work too...

    Thanks if anyone helps

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Maybe this is a useful work-around
    // save current clipboard
    object save = Clipboard.GetDataObject();

    // copy map to clipboard
    MyMap.CopyMap();

    // get picture from clipboard
    IDataObject pict = Clipboard.GetDataObject();

    // check available convert formats and convert
    string[] formats = pict.GetFormats();
    foreach ( string s in formats )
    if ( s.EndsWith(System.Windows.Forms.DataFormats.Bitmap ) ) {
    img = (System.Drawing.Image)pict.GetData(System.Windows. Forms.DataFormats.Bitmap);
    break;
    }

    //try to restore clipboard
    Clipboard.SetDataObject(save);

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. CopyMap AND Keep Selected Area
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-15-2005, 03:58 PM
  2. CopyMap in DLL
    By NewMP2004Dev in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 02-15-2005, 03:00 PM
  3. GetPictureFromObject with C#
    By gingerbbm in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-11-2004, 07:19 PM
  4. How to use GetPictureFromObject in MapPoint 2k4 ?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-31-2004, 08:58 AM
  5. Problem method Map.copymap() in visual basic .net
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-28-2003, 03:05 AM

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