Hi all
i just wanna ask if any one can give me the related function with colordialog(vb.net) and if i can change backcolor of form with it?how?

Thanks:confused:

Add ColorDialog control to the form , then change its property to the way you want it to show .

to show the dailog

ColorDialog1.ShowDialog()

you can get the color that user selected by ColorDialog1.Color after this you can set the backcolor of form to this color

Hi all
i just wanna ask if any one can give me the related function with colordialog(vb.net) and if i can change backcolor of form with it?how?

add a button and a colordialog to the form and type in the following code in the button_click event

If Me.ColorDialog1.ShowDialog = DialogResult.OK Then
            Me.BackColor = ColorDialog1.Color
        End If

the function or code

Me.ColorDialog1.ShowDialog() to change the back and fore color with control, i get every thing except this. Why is my
code window highlighting colordiaog1 when i type....should i declare something can some give me the whole code to change the fore color and the back color of a button during run time with control using this code?
what is colordialog1 by the way? Is it an object? what is it?
is it to do with visual basic i use? mine is microsoft visual basic 2008 express edition. Also guys please tell me if there is any website where i can get tutored visual basic....please
Thank you x_x

Edited 6 Years Ago by themccoolfan: n/a

Hi all
i just wanna ask if any one can give me the related function with colordialog(vb.net) and if i can change backcolor of form with it?how?

add a button and a colordialog to the form and type in the following code in the button_click event

If Me.ColorDialog1.ShowDialog = DialogResult.OK Then
            Me.BackColor = ColorDialog1.Color
        End If

I just wanted to ask, the above code would change the back ground color of the screen, however, I am writing a text editor and thought it would be cool to write up some code so that the user can change the text color like you can in ms word and such, so please tell me if I am wrong but if I changed the second line of the above code to
Me.TextColor = ColorDialog1.Color.
Would that work?

Thanks

John

Hi

Also guys please tell me if there is any website where i can get tutored visual basic....please

You can find some tutorials for VB 2008, here.

This article has been dead for over six months. Start a new discussion instead.