View Full Version : defalt background in vb.net
dw5304
03-12-2005, 04:30 PM
how do you go about overiding the defalt color by pressing a button.
Im trying to have it chage to the color of the choice of the user w/ a ColorDialog box any help will be helpfull
RyanB88
03-12-2005, 07:33 PM
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.BackColor = System.Drawing.Color.BlueViolet
End Sub
would make it BlueViolet if you want to chose from a color selector then if the color slector is on the forum then you have several images, that are just colored boxed, on click use that code for that boxes color, you would most likley have that in a seperate forum that will popup in which case the code would be this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim main As New Form1
main.BackColor = System.Drawing.Color.BlueViolet
Me.Close()
End Sub
which would have to first dimmain as the main form then change the color then that would also close the color selector.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.