color dialog

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • HSalim[MVP]

    #1

    color dialog

    Hi,

    I have a simple form with the default back color - (color name = "Control")
    I want to open a color dialog with this as the default color selected using
    this code.

    Dim cd As New ColorDialog()
    cd.AllowFullOpe n = True
    cd.Color = Me.BackColor
    Dim result As DialogResult = cd.ShowDialog()

    When I run it, I the color dialog defaults to the wrong color.
    How can I default the current color?

    Thanks
    Habib



Working...