答案 0 :(得分:1)
Using colorDialog As New ColorDialog
'If the user actually selected a color Then
If colorDialog.ShowDialog() = DialogResult.OK Then
'Set the background color of the picture box = color selected from the color dialog
PictureBox1.BackColor = colorDialog.Color
End If
End Using
将此代码放在Button_Click
事件处理程序中。