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

Setting A Lines Colour

This is a discussion on Setting A Lines Colour within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I have seen the colour chart posted in the FAQ, does anyone have an equivalent chart that can be ...

  1. #1
    tea_boy is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    9

    Setting A Lines Colour

    Hi, I have seen the colour chart posted in the FAQ, does anyone have an equivalent chart that can be used for c#? I am currently trying to set the forecolor of a line object, which takes an integer value.

    I have tried the following but it throws a runtime error saying the parameter is incorrect

    arrow.Line.ForeColor = Color.Red.ToArgb();

    Any help would be appreciated

    Thanks tea_boy

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

    Re: Setting A Lines Colour

    Hi,

    Just use the int value. Color in windows is the 3 lower byte of integer. Lowest is red, second is green, higher is blue.

    Code:
    arrow.Line.ForeColor = 0x0000FF; // red
    arrow.Line.ForeColor = 0x00FF00; // green
    arrow.Line.ForeColor = 0xFF0000; // blue
    and so you can mix and have any color value, chrominance and intensity you wants. If you experiment a bid you dont need all these constands anymore

    Code:
    Olive   0x008080
    Navy    0x800000
    Purple  0x800080
    Teal    0x808000
    Gray    0x808080
    Silver  0xC0C0C0

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. increase the number of colours in the colour pallet
    By ejy1 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-27-2005, 07:52 PM
  2. quick colour question
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-26-2004, 04:09 PM
  3. MapPoint's Standard 45 Colour Palette
    By Winwaed in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 05-11-2004, 08:06 PM
  4. Setting Speeds
    By aarunprakash in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-06-2003, 01:45 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