tags:

views:

47

answers:

1

i have the following code

Private Sub select_color_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles select_color.Click
        Dim ocolor As New ColorDialog
        ocolor.ShowDialog()


        Me.BackColor = ocolor.Color

    End Sub

and it changes the background color of form to the color i select in colordialogue...

now i want to change the BGColor of shockwaveobject in this way...however i can change the BGColor of shockwave object manually in toolbox but i want to change it by color dialogue how can i do that...

+1  A: 

You need to convert the color to a string:

    Dim ocolor As New ColorDialog
    If ocolor.ShowDialog() = Windows.Forms.DialogResult.OK Then
            Me.SwfObject.BGColor = ocolor.Color.R.ToString("X2") & ocolor.Color.G.ToString("X2") & ocolor.Color.B.ToString("X2")
    End If
Chris Haas