Try
Dim dlg As ColorDialog = New ColorDialog
dgl.color=button1.backcolor
If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Button1.backclor=dlg.clor
button2.BackColor = dlg.Color
End If
Catch
excp As Exception
MsgBox(excp.Message + excp.StackTrace)
End Try
End Sub
End Class
Don't judge me, just Upgrade me. Thanks!