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 5 of 5

Changing line Forecolor in VB.NET

This is a discussion on Changing line Forecolor in VB.NET within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi Does someone know the integer values of the line forecolor In VB.NET the vbRed type of name is not ...

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

    Changing line Forecolor in VB.NET

    Hi

    Does someone know the integer values of the line forecolor
    In VB.NET the vbRed type of name is not reserved so it seems that it is a bit more complicated to change the line colors

    Thank you
    Sany

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

    Problem is dat I annot find GeoRGBType in C#. In MP help I see following:
    GeoRGBType is identical to the Visual Basic MsoRGBType.
    But that is putting the ball back to your question... What is exacly definition of MsoRGBType in VB ?

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

    I managed by using this function. it an maybe help someone


    Imports System.Drawing
    Public Function GetColor(ByVal i As Integer)
    Dim colors As Integer
    Dim A, R, V, B As Integer
    A = 0

    Select Case i
    Case 0
    R = 0 : V = 0 : B = 0
    Case 1
    R = 255 : V = 0 : B = 0
    Case 2
    R = 0 : V = 255 : B = 0
    Case 3
    R = 255 : V = 255 : B = 0
    Case 4
    R = 0 : V = 0 : B = 255
    Case 5
    R = 255 : V = 0 : B = 255
    Case 6
    R = 0 : V = 255 : B = 255
    Case 7
    R = 128 : V = 255 : B = 255
    End Select

    colors = ColorTranslator.ToWin32(Color.FromArgb(A, R, V, B))
    Return colors
    End Function


    It is maybe not the best way but at least you can create the colors yourself

    Sany

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

    I managed by using this function. it an maybe help someone

    Imports System.Drawing
    Public Function GetColor(ByVal i As Integer)
    Dim colors As Integer
    Dim A, R, V, B As Integer
    A = 0

    Select Case i
    Case 0
    R = 0 : V = 0 : B = 0
    Case 1
    R = 255 : V = 0 : B = 0
    Case 2
    R = 0 : V = 255 : B = 0
    Case 3
    R = 255 : V = 255 : B = 0
    Case 4
    R = 0 : V = 0 : B = 255
    Case 5
    R = 255 : V = 0 : B = 255
    Case 6
    R = 0 : V = 255 : B = 255
    Case 7
    R = 128 : V = 255 : B = 255
    End Select

    colors = ColorTranslator.ToWin32(Color.FromArgb(A, R, V, B))
    Return colors
    End Function


    It is maybe not the best way but at least you can create the colors yourself

    Sany

  5. #5
    Ashu is offline Junior Member White Belt
    Join Date
    Sep 2008
    Posts
    1

    Re: Changing line Forecolor in VB.NET

    the following worked for me.

    Dim myColor As System.Drawing.Color = Color.Cyan
    Dim intColor AsInteger
    'Convert to int
    intColor = System.Drawing.ColorTranslator.ToOle(myColor)

    centerPoint.Fill.ForeColor = intColor

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing the Legend
    By Goldwings98SE in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-15-2005, 04:53 PM
  2. changing territory geography
    By bob everett in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-22-2003, 12:20 PM
  3. changing default printers
    By duncan888 in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-13-2003, 04:25 PM
  4. How can I create a line between two line with VB6
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-29-2003, 06:44 PM
  5. As I draw a line and then a pushpin on that line, ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-16-2002, 09:35 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