with the vb.net default color dialogbox

how can you handle the cancel buttons click event ?

if the cancel button is clicked, i dont want it to make any changes with the selected color. as of now if i click cancel it still edits the colors.

thanks

Made changes only Ok button is clicked

'Ignore the changes, if cancel button is clicked
    If ColorDialog.ShowDialog() = DialogResult.OK Then
        'Do some changes
    End If

or

If ColorDialog.ShowDialog() = DialogResult.OK Then
        'Process Ok button event
    ElseIf  ColorDialog.ShowDialog() = DialogResult.Cancel Then
        'Process Cancel button event
    End If

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.