开发者

how can i control shockwaveflash object BGColor with colordialogue in vb.net

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 sho开发者_运维技巧ckwave object manually in toolbox but i want to change it by color dialogue how can i do that...


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜